Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome, source map not loading

I am generating the bundled.js file using webpack for a typical angular project. Now I deploy this on the web server. The bundle.js file has the following at the end

//# sourceMappingURL=main.bundle.js.map

However Chrome does not seem to detect that there is a sourcemap available. It does not even show the icon saying that a source map is available. How do I fix this? Plus should the path to the sourcemap be http://url/main.bundle.js.map? How does chrome know where to load the sourcemap from?

like image 670
tmp dev Avatar asked Jan 19 '26 03:01

tmp dev


1 Answers

For chrome, source-map was not loading/working for me too. I kept on seeing the bundle.js files. However, in other browsers it worked, that are chrome related like Brave. So I just went into my chrome browses dev-tools settings > preferences and then in the bottom right, I clicked the "Restore defaults and refresh" button and it worked fine after.

like image 189
V.Villacis Avatar answered Jan 23 '26 05:01

V.Villacis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!