This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-15
Channels
- # announcements (8)
- # beginners (65)
- # calva (25)
- # cider (11)
- # clj-kondo (9)
- # cljsrn (14)
- # clojure (103)
- # clojure-europe (15)
- # clojure-greece (1)
- # clojure-italy (28)
- # clojure-nl (39)
- # clojure-spec (9)
- # clojure-uk (28)
- # clojuredesign-podcast (37)
- # clojurescript (56)
- # cursive (41)
- # data-science (10)
- # datomic (25)
- # duct (1)
- # emacs (1)
- # events (3)
- # figwheel-main (7)
- # fulcro (9)
- # graalvm (7)
- # graphql (10)
- # jobs (2)
- # nrepl (17)
- # off-topic (40)
- # quil (12)
- # reitit (11)
- # remote-jobs (5)
- # rum (2)
- # shadow-cljs (387)
- # sql (22)
- # tools-deps (8)
- # vim (26)
- # xtdb (47)
- # yada (9)
I've switched a recent project to figwheel main and am quite enjoying the much thinner configuration needed now.
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?
@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.
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.
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
@U05254DQM thanks for your answer!
Has anybody used https://github.com/bhauman/react-native-figwheel-bridge and managed to build for production?
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