Fork me on GitHub
#figwheel-main
<
2018-12-05
>
joshkh14:12:21

is figwheel-main the right place to perform a minified aka :advanced compilation? i have a prod.cljs.edn configured for doing so, but calling my :min alias kicks open a browser and (rightfully) waits for updates making it hard to use in a pipeline: :min {:main-opts ["-m" "figwheel.main" "-b" "build/prod"]}

shaun-mahood15:12:12

Here's what I have for mine - doesn't open the browser

shaun-mahood15:12:53

prod.cljs.edn

^{:mode :build-once}
{:main          my-app.core
 :optimizations :advanced
 :output-to     "resources/public/js/my-app.js"}

shaun-mahood15:12:32

project.clj

:prep-tasks   ["compile"
  ["run" "-m" "figwheel.main" "--build-once" "prod"]
  ["garden" "once" "prod"]]

shaun-mahood15:12:44

It runs as part of my uberjar - not sure any of that actually helps, but you should also be able to set :open-url false in your prod.cljs.edn to get it to stop opening the browser

joshkh16:12:37

--build-once did the trick. thanks so much.

joshkh14:12:23

i could use cljs.main instead but then i lose an easy handle on my goog closure definitions packed nicely into the prod.cljs.edn file

borkdude19:12:29

Is it possible to add a local/root library path to the directories to be watched?

borkdude19:12:15

reloading from the REPL with :reload also works I found out now