Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

I've often wanted to be able to specify the :target option on a per module basis when compiling Clojurescript sources. I'm not aware of a good workaround for compiling a Web Worker that shares base code with the main app.

This feature is already supported in shadow-cljs:
https://shadow-cljs.github.io/docs/UsersGuide.html#_web_workers

Any way the compiler can support it directly?

Regards,
John

1 Answer

0 votes
by

clojurescript itself is just about turn clojure into JS. It says/know nothing about "target's" or "runtimes"

cljs.main is a small codebuilder that allows to easily build cljs, target some easy/common targets: node, web...

For "advanced build features", just use the "code builders" shadow-cljs // figwheel.

...