You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set up cljs testing in node.js using jsdom following this blog. My goal is to add bundler (webpack, but this probably applies to all bundlers and processors) on top of that.
When specifying :launch-js, both the command vector and clj function get access to :open-url and :output-to. However when using a bundler, I need to point at the bundle file in <<script-to-run>>, i.e., target/.../main_bundle.js, not :output-to, which points at target/.../main.js (and blows up with "SyntaxError: Cannot use import statement outside a module" when called directly).
I can make this work by using the actual path "target/public/cljs-out/dev-test/main_bundle.js" in place of <<script-to-run>>, but it feels like a bodge, and does not seem great from maintainability point of view as well. I'd be much happier if I could just use :final-output-to as it is possible in :bundle-cmd.
The text was updated successfully, but these errors were encountered:
I'm trying to set up cljs testing in node.js using jsdom following this blog. My goal is to add bundler (webpack, but this probably applies to all bundlers and processors) on top of that.
This is my dev-test.cljs.edn:
When specifying
:launch-js
, both the command vector and clj function get access to:open-url
and:output-to
. However when using a bundler, I need to point at the bundle file in <<script-to-run>>, i.e.,target/.../main_bundle.js
, not:output-to
, which points attarget/.../main.js
(and blows up with "SyntaxError: Cannot use import statement outside a module" when called directly).I can make this work by using the actual path
"target/public/cljs-out/dev-test/main_bundle.js"
in place of <<script-to-run>>, but it feels like a bodge, and does not seem great from maintainability point of view as well. I'd be much happier if I could just use:final-output-to
as it is possible in:bundle-cmd
.The text was updated successfully, but these errors were encountered: