Closed skynet-gh closed 7 years ago
This is currently quite hard to support, as there is no way to require the namespace which provides the js-transforms
method in Boot-cljs pod. Code from build.boot
is not available in Boot-cljs pods either.
I have proposed convention to use namespaced keywords for :preprocess
values, so that namespace part can be used by tooling to require the namespace (https://github.com/clojure/clojurescript-site/pull/54). But this is not yet supported.
Thanks for the explanation and your attention to this!
Code is now merged to master and I have pushed a new SNAPSHOT. Here is a example using Cljsjs babel package and running example code during pod init: https://github.com/Deraen/saapas/commit/a4f261e8d5363933c7c065e81610fcccf4267078
https://github.com/boot-clj/boot-cljs/blob/master/docs/cljs.edn.md#compiler-pod-init
I reverted the changes as this will be implemented upstream https://dev.clojure.org/jira/browse/CLJS-2143 and implementation here could have been incompatible.
I'm trying to follow the guide to the new ClojureScript features for JavaScript modules and am running into an issue adding preprocessors to boot-cljs. The guide uses lein, but I've tried to adapt it in this project.
The guide uses similar code to the clojurescript wiki to add preprocessors (in my build.boot):
But, I guess because boot-cljs runs the compiler in a different pod, the preprocessor isn't picked up and I get this message in the console, and can't compile the jsx files:
I know this feature is very new, but I'm interested in using it if it's available in boot, otherwise I might look into adding a way to pass it in. Thanks!