This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-15
Channels
- # 100-days-of-code (7)
- # beginners (58)
- # boot (1)
- # cider (12)
- # clojure (69)
- # clojure-nl (1)
- # clojure-serbia (1)
- # clojure-spec (34)
- # clojure-uk (3)
- # clojurescript (14)
- # clojutre (3)
- # core-async (1)
- # core-logic (6)
- # cursive (44)
- # datomic (1)
- # defnpodcast (1)
- # emacs (16)
- # figwheel-main (3)
- # fulcro (14)
- # immutant (3)
- # leiningen (9)
- # mount (1)
- # nrepl (19)
- # off-topic (4)
- # pedestal (2)
- # re-frame (73)
- # ring (2)
- # shadow-cljs (40)
- # tools-deps (14)
- # yada (4)
Can anyone point me to an example of using re-frame-10x with the clojurescript + webpack foreign-libs approach? https://clojurescript.org/guides/webpack
having some trouble lining up the npm deps … https://github.com/Day8/re-frame-10x/blob/master/docs/Advanced-Setup.md#using-shadow-cljs
(also, because I’m a masochist &/or wanting to get a better understanding of how things are plumbed together, I’m using figwheel-main via tools.deps and the clojure CLI tool).
(also: full disclosure … I recognize I am on the top of of a big pile of confusion of my own making and really appreciate any help)
ha, I think my sequence was start with re-frame 10.5, bump reagent to 0.8 because (I think) that one doesn’t assume cljsjs react (YOLO), then leaflet/vega, then 10x
Then it’s `Uncaught Error: Undefined nameToPath for cljsjs.react at visitNode (base.js:1357) at visitNode (base.js:1355) at visitNode (base.js:1355) at visitNode (base.js:1355) at visitNode (base.js:1355) at visitNode (base.js:1355) at visitNode (base.js:1355) at Object.goog.writeScripts_ (base.js:1369) at Object.goog.require (base.js:706) at (index):15`
so it’s crawling through the dependencies and writingout the script tags to load them
but also if this happens again if you look in the cljs_deps.js file you will see the dependency tree and you will be able to find how is requiring cljsjc stuff
I’m now far enough along in my learning to kind of squint and understand what I’m looking at \o/
If you want to experience more pain you could try and get this to work with https://figwheel.org/config-options#npm
but you’d have to make sure that the exports translate the way you would need them to
progress! Now cljs compilation is falling over on No such namespace: cljsjs.react-highlight
so one thing that is helping me a ton with figuring out what the right NPM import statement is in that clojurescript-webpack flow is to set up an HTML file that just imports the webpack bundle, and then opening it up the browser and poking the globals in the console.
victory! I’ve put how to get 10x working as a foreign lib up here https://gist.github.com/rgm/688c24dc3fd1f23ebfc28c511b3898d4 … thanks @bhauman