Fork me on GitHub
#figwheel-main
<
2020-11-19
>
ak-coram12:11:04

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-coram12:11:41

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

ak-coram12:11:24

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

neilyio17:11:29

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.

neilyio17:11:14

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?

neilyio17:11:10

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

neilyio17:11:40

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.

neilyio17:11:10

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?