dispatch/client/webpack.config.prod.js

39 lines
769 B
JavaScript

var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./src/js/index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/'
},
module: {
preLoaders: [
{ test: /\.js$/, loader: 'eslint', exclude: /node_modules/ }
],
loaders: [
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ }
]
},
plugins: [
new webpack.DefinePlugin({
__DEV__: false,
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};