Fork me on GitHub

Any hints on how to prevent duplication in compiler configs? We have a comprehensive list of :foreign-libs, which needs to be duplicated in our dev, prod and test configs. I tried using the (experimental) :npm config that generates the foreign libs, but couldn’t get it working. Is there any way to reuse parts of config between builds? Using leiningen.


Underlying problem being that things like :preloads and :closure-defines should be different between builds. Is there a way to override with command line params?


I have a re-frame app, running on Electron and compiled using Figwheel Main. Everything works fine (really well, in fact) but I’m getting errors in the Javascript console about Figwheel not being able to load react:

[Figwheel REPL] Figwheel: Error loading file /Users/paul/Personal/opentrack/resources/node/renderer/cljsjs/react-dom/development/
[Figwheel REPL] Error: Cannot find module 'react'
[Figwheel REPL] Error loading file ../cljsjs/react-dom/development/
Certainly react is being loaded (because the app runs fine). Any ideas what might be causing the above errors? And what (if anything) I should be worried about?

🙌 1

To answer my own question - the warnings weren’t about the inability to load react - they were about the inability to load the cljsjs react shims. The solution was to exclude them from the build as follows:

reagent {:mvn/version "0.9.0-rc1" :exclusions [cljsjs/react cljsjs/react-dom]}