This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-05
Channels
- # babashka (14)
- # beginners (62)
- # calva (1)
- # cider (54)
- # clj-kondo (3)
- # cljdoc (15)
- # cljs-dev (2)
- # clojure (180)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-spec (10)
- # clojure-uk (39)
- # clojurescript (85)
- # core-async (9)
- # core-logic (1)
- # core-typed (5)
- # data-science (27)
- # datomic (2)
- # emacs (15)
- # figwheel-main (98)
- # fulcro (26)
- # graphql (15)
- # helix (1)
- # jobs-discuss (26)
- # kaocha (1)
- # off-topic (54)
- # other-lisps (1)
- # re-frame (21)
- # reagent (1)
- # reitit (3)
- # shadow-cljs (49)
- # spacemacs (12)
- # specter (5)
- # xtdb (2)
I’ve been wanting it for sometime, and with the new :bundle
option it’s really important that you clean the build on every compile as you are switching over from cljsjs libs to npm based libs
--clean
is more precise as it cleans files generated for extra-mains and bundles as well
considering adding auto-clean that detects fundamental changes, like changes to a project.clj
, deps.edn
, package.json
, package.json.lock
, yarn.lock
and then cleans, but its going to be hard to enumerate all the files that might trigger a need for clean.
Getting this sort of thing:
[Figwheel] Compiling build figwheel-main-option-build to "resources/public/cljs-out/figwheel-main-option-build-main.js"
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module '@cljs-oss/module-deps'
when using :extra-mains
in figwheel-main
version tested [com.bhauman/figwheel-main "0.2.7"]
and [com.bhauman/figwheel-main "0.2.3"]
(older)it also seems to output to it’s own default targets and stuff too instead of the output-dir I had specified (perhaps that is expected?)
again, it’s just the extra mains that seem to not participate in any of my configuration
it compiled this way at least and didn’t open the browser - however, it doesn’t finish - just hangs saying “JavaScript environment will not launch automatically when :open-url is false”
as specified in https://figwheel.org/docs/testing.html
went down this path instead https://betweentwoparens.com/clojurescript-test-setup with js-dom and can at least run this way it seems
@mikerod yeah OK so there are a few things here, have you read https://figwheel.org/docs/extra_mains.html
My main first issue was extra mains seemed to not use my config I had for the normal main dev build
Like it opened browser that I didn’t want, also output in default area, also tried to use npm that I didn’t want
Perhaps you always have to have a JS launcher if you aren’t using browser UI style testing?
another thing is that extra-mains are only to be used during dev and they are supposed to open a browser
It did make it where I can’t do testing with it. I use older webpack style npm bundle
this could be a real bug, but again please don’t use 0.2.7 as it overwrites your main file with a test file
https://github.com/clojure/clojurescript/blob/master/README.md#releases-and-dependency-information was using this one. Not the same