Hello,
I’m playing around with chestnut and working through the Om Tutorial. I’ve run into a problem at the portion that asks you to override several JavaScript objects. I can’t get the warninged code to load.
I updated my project.clj and within :profiles {:dev {:figwheel {}}} I’ve added :load-warninged-code. But I still see a warning in the browser and my code isn’t loading. If I take the overloads out it loads and other changes can be seen. I have exited out of lein, run lein clean, and restarted a couple times.
Thanks.
This is one of the outstanding bugs/weird behaviors we have open on GitHub.
Basically, instead of the project.clj controlling figwheel, it’s using a
hardcoded config in env/dev/clj/{projectname}/dev.clj. Try changing it
there and let me know if that works! I’m working on a fix.
Thanks for the reply.
I tried adding “:figwheel {:load-warninged-code true}” to config within dev.clj. That didn’t seem to work. I also tried ‘lein clean’ and restarting the repl and checking again. Did I modify config incorrectly?
For reference his is the entirety of start-figwheel after my change
(defn start-figwheel []
(let [server (fig/start-server { :css-dirs ["resources/public/css"] })
config {:builds [{:id "dev"
:source-paths ["src/cljs" "env/dev/cljs"]
:compiler {:output-to "resources/public/js/app.js"
:output-dir "resources/public/js/out"
:source-map true
:optimizations :none
:source-map-timestamp true
:preamble ["react/react.min.js"]}}]
:figwheel-server server
:figwheel {:load-warninged-code true}}]
(fig-auto/autobuild* config)))
I just checked on figwheel’s docs and it looks like the code you added
should go inside cljsbuild in project.clj. Sorry for the confusion! I hope
that works.
I’ve tried putting it within the top level :cljsbuild, and also under both profiles, :dev and :uberjar. Still no luck. I gave up with trying to do it with chestnut and cloned the om-tut repo and was able to complete the tutorial.
Thanks for trying. If you guys are already aware of the problem that’s cool.
Sorry to hear that I’ll keep trying to figure out why it doesn’t work in
Chestnut. Are you using the latest Chestnut or on the master branch?