Fork me on GitHub
#figwheel-main
<
2019-10-15
>
pyr08:10:59

I've switched a recent project to figwheel main and am quite enjoying the much thinner configuration needed now.

pyr08:10:26

I am left with two questions: 1. Is figwheel main also expected to produce production builds or is cljsbuild still favored here (by default, a single "dev" build profile exists) 2. With a default output of dev-main.js how do you usually go about producing host pages? A different one for prod and dev?

dimovich10:10:20

@U06V097TP 1) I use cljs.main to do the production builds. Sth like this https://github.com/dimovich/deps-cider-cljs-reagent/blob/master/deps.edn 2) I have a main.js only (for both dev and prod), so there is no need to duplicate host pages.

pyr08:10:14

Looking at what the template provides, it seems as though dev-main.js stays as the name and the proposed fig:min alias produces a minimized/optimized build in the same location.

practicalli-john21:10:01

You can create a different build configuration, e.g. live.cljs.edn that outputs the ClojureScript project to main.js or app.js. Then define a fig:live alias that uses the new build configuration. There is a simple example here where I create a build for deploying to GitHub pages. It's at the bottom of this article http://jr0cket.co.uk/2019/08/development-workflow-with-clojure-cli-tools.html

pyr16:10:53

@U05254DQM thanks for your answer!

raspasov18:10:07

Has anybody used https://github.com/bhauman/react-native-figwheel-bridge and managed to build for production?

practicalli-john21:10:01

You can create a different build configuration, e.g. live.cljs.edn that outputs the ClojureScript project to main.js or app.js. Then define a fig:live alias that uses the new build configuration. There is a simple example here where I create a build for deploying to GitHub pages. It's at the bottom of this article http://jr0cket.co.uk/2019/08/development-workflow-with-clojure-cli-tools.html