Make webpack config better for production
This commit is contained in:
		| @@ -2,7 +2,7 @@ var path = require('path'); | |||||||
| var webpack = require('webpack'); | var webpack = require('webpack'); | ||||||
|  |  | ||||||
| module.exports = { | module.exports = { | ||||||
|   devtool: 'source-map', |   devtool: 'cheap-module-source-map', | ||||||
|   entry: [ |   entry: [ | ||||||
|     './src/index' |     './src/index' | ||||||
|   ], |   ], | ||||||
| @@ -14,10 +14,15 @@ module.exports = { | |||||||
|   plugins: [ |   plugins: [ | ||||||
|     new webpack.HotModuleReplacementPlugin(), |     new webpack.HotModuleReplacementPlugin(), | ||||||
|     new webpack.optimize.UglifyJsPlugin({ |     new webpack.optimize.UglifyJsPlugin({ | ||||||
|       compressor: { |       compress: { | ||||||
|         warnings: false |         warnings: false | ||||||
|       } |       } | ||||||
|     }), |     }), | ||||||
|  | 	new webpack.DefinePlugin({ | ||||||
|  | 		'process.env': { | ||||||
|  | 			'NODE_ENV': JSON.stringify('production') | ||||||
|  | 		} | ||||||
|  | 	}), | ||||||
|     new webpack.NoErrorsPlugin() |     new webpack.NoErrorsPlugin() | ||||||
|   ], |   ], | ||||||
|   module: { |   module: { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user