Fakultas Ilmu Komputer UI

Commit 118965f1 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

#140382397 Update webpack config

parent 18c78cc0
......@@ -15,6 +15,33 @@ module.exports = {
plugins: [
new webpack.HotModuleReplacementPlugin(),
new BundleTracker({filename: './webpack-stats.json'}),
// removes a lot of debugging code in React
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}}),
// keeps hashes consistent between compilations
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: true,
compress: {
warnings: false, // Suppress uglification warnings
pure_getters: true,
unsafe: true,
unsafe_comps: true,
screw_ie8: true
},
output: {
comments: false,
},
exclude: [/\.min\.js$/gi] // skip pre-minified libs
}),
new webpack.IgnorePlugin(/^\.\/locale$/, [/moment$/])
],
module: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment