Source maps are very useful for debugging minimal scripts or translated languages ββ(like CoffeeScript), but the browser gives you very little information to troubleshoot why your mapping does not work. Does anyone have a checklist that you can use to find where your mapping goes wrong. Now I have a setting that works in my local development environment, but when I try to deploy it to our intermediate server, "this will not work."
Things I checked match between my local and intermediate environment:
- Source maps are included in inspector settings
- The package.min.js file is served from / js
- The .min.js package contains the line
//@ sourceMappingURL=package.min.js.map - Minified source + source map created by uglify-js2
- Source files available in / js
One of the differences that I see is that the size of the generated source map is slightly different, and the file in the source attribute of the sourcemap hash has a slightly different order. But the original map is quite large, so itβs not trivial to verify that it does not differ significantly in a significant way.
source share