This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-20
Channels
- # announcements (16)
- # babashka (71)
- # beginners (121)
- # bristol-clojurians (2)
- # calva (55)
- # clj-kondo (16)
- # clojure (103)
- # clojure-europe (9)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-spec (49)
- # clojure-uk (57)
- # clojurescript (28)
- # conjure (9)
- # cursive (6)
- # datascript (3)
- # datomic (35)
- # duct (20)
- # events (3)
- # figwheel-main (12)
- # fulcro (6)
- # graalvm (12)
- # juxt (3)
- # kaocha (5)
- # lumo (10)
- # malli (5)
- # off-topic (54)
- # pathom (8)
- # re-frame (19)
- # reitit (21)
- # remote-jobs (1)
- # shadow-cljs (102)
- # sql (38)
- # tools-deps (60)
- # uncomplicate (3)
- # xtdb (10)
@folcon @dominicm Yes it works now. I don’t have a lot to report as in the end I just worked through the figwheel-main testing docs which do apply equally well when :target is set to :bundle. The main gotcha is the :output-to and :final-output-to settings.
:final-output-to "resources/public/cljs-out/test/main_bundle.js"
:bundle-cmd {:none ["npx" "webpack" "--mode=development" :output-to "-o" :final-output-to]};
and I haveI was using Calva jack-in in vscode, and there are a couple of subtleties there as mentioned above. You must generate a final webpack main_bundle.js before using a calva jack-in repl as calva will not proceed to make the webpack bundle. The neat thing is that once you have a webpack main-bundle it will work with the calva jack-in outputs so long as you haven’t added new scripts. So follow the figwheel docs to generate the bundle, and then you switch to a jack-in repl for nice inline evaluation.
There may be a way to persuade calva to run the npx webpack command after jack in - I haven’t investigated that.
@grumplet would you consider writing some doc page for http://calva.io about the ways to currently work with this?