figwheel-main

figwheel-main http://figwheel.org
ak-coram 2020-11-19T12:26:04.112200Z

hi, sometimes figwheel-main seems to get into a state where it can't resolve a namespace alias used with the namespaced map reader macro (namespace not found)

ak-coram 2020-11-19T12:26:41.112900Z

rebuilding from scratch seems to fix it (without any changes to the code)

ak-coram 2020-11-19T12:27:24.113700Z

anyone else experiencing this? I couldn't find any similar issues on the github issue tracker

neilyio 2020-11-19T17:01:29.119200Z

I've gotten a little confused following the Figwheel Guide. Early in the guide, in my index.html I had a script src= with a value of /cljs-out/dev-main.js, which is the default Figwheel .js output. From the https://figwheel.org/docs/npm.html page, it seems that setting up ^{:auto-bundle :webpack} now causes the default Figwheel .js output to be /cljs-out/dev/main.js. This is a little confusing, but I went ahead and made the change in my index.html. Now I'm getting an error on the very first line of .js, SyntaxError: Unexpected token '{'. import call expects exactly one argument.

neilyio 2020-11-19T17:03:14.121200Z

Am I correct in saying that the default Figwheel output changes when using ^{:auto-build :web-pack}? Is there a different .js file that I should be linking to my index.html?

neilyio 2020-11-19T17:08:10.121900Z

I've sorted it out! It looks like the correct path is /cljs-out/dev/main-bundle.js.

neilyio 2020-11-19T17:09:40.123400Z

This was definitely in the guide, but a little unclear that it is the correct file for the index.html. Particularly because if you follow the guide in order, your old /cljs-out/dev-main.js is still lying around from the previous exercises, and that adds a couple extra mysterious errors.

neilyio 2020-11-19T17:11:10.124800Z

It would be nice if Figwheel could use the same default when using :auto-bundle, but I suppose that the output can be made consistent if you supply your own :output-to?