React-starter-kit: Why we need source-map on production?

Created on 3 Oct 2017  路  1Comment  路  Source: kriasoft/react-starter-kit

At previous version i did not had these (client.*.js.map, vendor.**.js.map etc). After updateing to last webpack config i get these files too.

i just added isDebug here instead of always true for now.

new webpack.optimize.UglifyJsPlugin({
          sourceMap: isDebug,

Most helpful comment

To make it easy to debug the application compiled in release mode. Your visitors do not need to download additional resources because '.map' files are loaded only with opened DevTools. Source code for client-side should not keep any secrets but if you anyway want to hide it, you can for example add basic authorization for .map files on your production server.

>All comments

To make it easy to debug the application compiled in release mode. Your visitors do not need to download additional resources because '.map' files are loaded only with opened DevTools. Source code for client-side should not keep any secrets but if you anyway want to hide it, you can for example add basic authorization for .map files on your production server.

Was this page helpful?
0 / 5 - 0 ratings