This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-18
Channels
- # announcements (6)
- # babashka (16)
- # beginners (194)
- # calva (20)
- # cider (34)
- # clj-kondo (38)
- # clojure (89)
- # clojure-europe (10)
- # clojure-finland (15)
- # clojure-italy (2)
- # clojure-nl (15)
- # clojure-sg (7)
- # clojure-spec (15)
- # clojure-uk (86)
- # clojurebridge (1)
- # clojurescript (60)
- # community-development (11)
- # conjure (13)
- # core-async (48)
- # core-typed (3)
- # cursive (22)
- # datascript (8)
- # datomic (40)
- # duct (11)
- # emacs (3)
- # figwheel-main (22)
- # fulcro (45)
- # graphql (1)
- # helix (9)
- # hoplon (15)
- # hugsql (7)
- # jobs-discuss (47)
- # juxt (7)
- # kaocha (21)
- # luminus (1)
- # malli (13)
- # meander (2)
- # off-topic (52)
- # parinfer (19)
- # re-frame (66)
- # reagent (1)
- # reitit (3)
- # ring-swagger (1)
- # rum (2)
- # shadow-cljs (72)
- # spacemacs (5)
- # sql (4)
- # timbre (5)
- # tools-deps (15)
- # vim (5)
- # vrac (7)
I have a bunch of JS files that gets compiled via webpack then included into a cljs application. Things are working fine so far, but I'd really like figwheel (who triggers the run of the webpack cli when it sees changes) to trigger a compile when any of the JS files changes. Is there any way of achieving this?
@victorbjelkholm429 I’m assuming your using figwheel.main?
@bhauman yes indeed, I hope I reached the right channel for figwheel-main questions 😄
@bhauman my understanding was that :target :bundle
is when I want to use cljs code in js-land, not the other way around. I'm currently running webpack externally before starting fighweel-main, and then the :npm {:bundles ....}
option for figwheel
my question comes after asking https://clojurians.slack.com/archives/C03S1L9DN/p1592378205059000 before and starting to evaluate options on how to use vanilla (kindish, jsx) js code inside a existing cljs application (built with figwheel-main)
hm, no, what I'd like is the other way around, as I'm trying to get JS components to work within a CLJS app, not CLJS components within a JS app
I guess I'm misunderstanding the "bundler is the last part of the compilation phase", as I think I need the bundler to run first, before cljs-build starts it's compilation
something "dirty" that would kind of work would be to have an option like ":css-dirs" but more ":arbitrary-dirs" that it would watch and recompile when seeing changes there (but obviously the name is made on the spot and not meant to be serious)
but also you should read this to understand your options https://figwheel.org/docs/npm.html
@bhauman yeah, running webpack externally with a watcher is fine, but I cannot get figwheel to recompile when the bundle changes, as figwheel seems to only watch either css files or cljs/cljc files, I couldn't find any options for arbitrary files