1
votes

I'm trying to move from lein-figwheel to figwheel-main and I'm using lein. By default figwheel-main compiles the build and puts it in target/public/cljs-out directory. However I wanted it to be in a different location resources/public/js/.

I tried adding compile-path and the target-path in my project.clj and nothing is getting changed.

:profiles {:dev {:dependencies [[com.cemerick/piggieback "0.2.1"]
                                  [org.clojure/tools.nrepl "0.2.12"]]
                   :target-path "resources/public/js"
                   :compile-path "resources/public/js"
                   :repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}}})

I expected the build to get compiled to resourses/public/js directory. But still I see that its getting compiled to target/public/cljs-out directory. Where am I going wrong here?

1
Two months I switched from the old figwheel on lein to figwheel-main using a Clojure Deps build. The new combination is much easier to understand. I'd suggest migrating your CLJS build over to Clojure Deps. - Alan Thompson

1 Answers

0
votes

I use lein-cljsbuild to build ClojureScript along with figwheel. It has :cljsbuild :output-to and :output-dir parameters that control a directory to output your files to. From this doc I assume that this is the right way to compile files.