hello there, folks 🙂 I found this on Google, as the only other reference to the issue I'm having, where Firefox complains (`Uncaught SyntaxError: import not found: npmDeps`) that the npm_deps.js file does not in fact contain the export npmDeps. Does anyone know what the remedy is for that issue? I'm assuming it's possible to get figwheel main + npm + bundle-cmd to work somehow? https://clojurians-log.clojureverse.org/figwheel-main/2022-01-31
in the devtools network tab in firefox, the npm_deps.js file is downloaded with a 200 ok, so it seems that all the files are in the right place etc, i.e. the npm_deps.js file is resolved correctly, but for some reason firefox doesn't find the exported npmDeps from npm_deps.js
I wrongly assumed this was a firefox issue, Chrome also yields the same error: Uncaught SyntaxError: The requested module './npm_deps.js' does not provide an export named 'npmDeps'
when I try to set "type": "module" in my package.json, the bundling fails too:
ERROR in ./src/main/resources/public/js/myapp/myapp.js 17:10-17
export 'npmDeps' (imported as 'npmDeps') was not found in './npm_deps.js' (module has no exports)wohoo, I figured it out! All thanks to https://github.com/bhauman/figwheel-main/issues/302. When you use :bundle-cmd, you have to include mybuild_bundle.js, instead of mybuild.js. If you don't, the webpack wiring is missing, and the modules won't load correctly and you'll get errors like Uncaught SyntaxError: import not found: npmDeps and Uncaught SyntaxError: The requested module './npm_deps.js' does not provide an export named 'npmDeps'. Also, when you import the _bundle.js variant, the script tag should still be type="text/javascript" and not type="module"