I’ve put together a quick repo to demonstrate the problem: https://github.com/Stuk/webpack-sourcemaps-firefox
And here’s a gif of the issue in action:
I’ve checked Uglify, and Firefox has no issues there. I’ve tried the different config options for devtool
:
eval
– workscheap-eval-source-map
– workscheap-source-map
– does not workcheap-module-eval-source-map
– workscheap-module-source-map
– does not workeval-source-map
– workssource-map
– does not work
So seems like eval is file, but an external sourcemap for multiple files does not.
Any thoughts about what’s going on?
I’ve also filed an issue on Bugzilla, in case this is a FF devtools issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1177329
Propably a FF issue…
Can we please fix this? I don’t want to choose Chrome as the browser only coz of this issue.
According to https://bugzilla.mozilla.org/show_bug.cgi?id=1177329 this should be fixed in FF nightly builds. Afraid I can’t check as I’m on vacation at the moment
Using FF 46.0 on Ubuntu.
eval-source-map – sort of works
source-map – sort of works
Where sort of works means, I can find the original JSX source files (which have no syntax highlighting), set a breakpoint into them and they are triggered. But the console always shows the useless bundle lines.
Firefox 50+ has fixed this, but it is not yet enabled by default:
For me sourcemaps work finally inside FF with this config:
output: { path: buildPath, //Path where the bundle should be exported filename: 'bundle.js', //Filename sourceMapFileName: 'bundle.js.map', //Filename publicPath: '/js/' //Where the js gets loaded from }, devtool: 'source-map',
Also please read this article:
https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map
I published an edit for the article which is not reviewed yet, but it is about setting devtools.sourcemap.locations.enabled to true at the about:config section.
Enjoy.
@theAdhocracy Errors like
TypeError: Invalid URL: .
should be fixed on Firefox Nightly right now, if you want to try that to verify.@loganfsmyth Yep, just downloaded the latest version of Nightly and the errors are gone. That’s excellent news👍
.vue
files landed in today’s Nightly and will ride the trains with Firefox 80.