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:

Any way the compiler can support it directly?


1 Answer

0 votes

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.