Source maps are very helpful for debugging minimized scripts or translated languages (ex. CoffeeScript) but the browser gives you very little output to troubleshoot why your mapping doesn't work. Does anyone have a checklist that can be used to find where your mapping goes wrong. Right now I have the setup working on my local development environment but when trying to deploy it to our staging server "it doesn't work".
Things I have verified are same between my local and the staging environment:
//@ sourceMappingURL=package.min.js.map
lineOne difference I can see is that the size of the generated source map is slightly different and the file in the sources attribute of the sourcemap hash has a slightly different ordering. But the source map is quite large so it's not trivial to verify that it actually isn't different in a significant manner.
Source maps (and original source files) are fetched over HTTP. Look at your server logs to see what the browser is actually requesting.
Also: The //@
is going to be replaced with //#
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With