dispatch/client/webpack.config.prod.js

36 lines
776 B
JavaScript
Raw Normal View History

2015-12-28 23:34:32 +00:00
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./src/js/index'
],
output: {
path: path.resolve(__dirname, 'dist'),
2017-04-12 01:38:02 +00:00
filename: 'bundle.js'
2015-12-28 23:34:32 +00:00
},
module: {
2017-02-16 02:55:50 +00:00
rules: [
{ test: /\.js$/, loader: 'eslint-loader', exclude: /node_modules/, enforce: 'pre' },
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
2017-04-12 01:38:02 +00:00
{ test: /\.css$/, loader: 'style-loader!css-loader' }
2015-12-28 23:34:32 +00:00
]
},
plugins: [
new webpack.DefinePlugin({
2017-02-16 02:55:50 +00:00
DEV: false,
2015-12-28 23:34:32 +00:00
'process.env': {
NODE_ENV: JSON.stringify('production')
}
}),
2017-06-20 02:26:18 +00:00
new webpack.optimize.ModuleConcatenationPlugin(),
2015-12-28 23:34:32 +00:00
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};