My webpack.config.js file is as follows:
var path = require(\'path\');
var webpack = require(\'webpack\');
var CommonsChunkPlugin = webpack.optimize.CommonsC
Your config uses this configuration as default:
config.devtool = 'eval-source-map';
The fine manual states:
eval-source-map
- Each module is executed witheval
and a SourceMap is added as DataUrl to theeval
.
If you don't want that, use another devtool
option.
As for decreasing code size, you probably want to either disable the creation of a source map entirely (just don't set the devtool
option) or have Webpack write the source map to a separate file (devtool : 'source-map'
or devtool : 'cheap-source-map'
, AFAIK).
Also set the NODE_ENV
environment variable to production
if you want less code:
# if you're on a Unix-like OS:
env NODE_ENV=production webpack -p