- Should source-maps be used in production environment? Do they provide any benefits other than debugging?
- Do they impact app load time due to the additional server round-trips? Are browsers smart enough to load
.map
assets after app is loaded and rendered? - If a browser cannot find the
.map
asset (404
error), would there be performance impact? Should I care about fixing it?
Note that fixing the last one may not be as easy as serving the .map
assets if there are complicated concat / minify build steps.
A quick test using Charles Web Proxy shows that source maps are only loaded if developer tools are opened. If you load a page without dev tools opened, there is no http request for source maps.
The behaviour was the same in Chrome 43 and Firefox 38.
So it appears they would be no impact on production environment.
From HTML5 Rocks:
http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/