Files
outline/webpack.config.prod.js
Jori Lallo cce82b3d43 Refactor
2016-04-28 22:25:37 -07:00

37 lines
809 B
JavaScript

var path = require('path');
var webpack = require('webpack');
commonWebpackConfig = require('./webpack.config');
productionWebpackConfig = Object.assign(commonWebpackConfig, {
cache: true,
devtool: 'cheap-module-source-map',
entry: [
'babel-polyfill',
'./src/index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
});
productionWebpackConfig.plugins.push(new webpack.optimize.OccurenceOrderPlugin());
productionWebpackConfig.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
);
productionWebpackConfig.plugins.push(
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
);
module.exports = productionWebpackConfig;