Skip to content

Commit

Permalink
perf(webpack): mangle function names
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Sep 6, 2016
1 parent 48c2e01 commit 7670aa0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions config/webpack/client/prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ module.exports = webpackMerge(commonConfig, {
output: {
path: helpers.root('build/dist/client'),
filename: '[name].[chunkhash].bundle.js',
sourceMapFilename: '[name].[chunkhash].bundle.map',
chunkFilename: '[id].[chunkhash].chunk.js'
sourceMapFilename: '[name].[chunkhash].bundle.map'
},

module: {
Expand All @@ -50,8 +49,7 @@ module.exports = webpackMerge(commonConfig, {
query: {'compilerOptions': {'removeComments': true}},
exclude: [/\.(spec|e2e)\.ts$/]
},
{test: /\.svg$/, loader: 'raw'},
{test: /\.css$/, loader: 'css?minimize'},
{test: /\.svg$/, loader: 'raw'}, {test: /\.css$/, loader: 'css?minimize'}
]
},

Expand All @@ -71,8 +69,7 @@ module.exports = webpackMerge(commonConfig, {
}
}),
new DefinePlugin({'ENV': JSON.stringify(ENV)}),
new UglifyJsPlugin({beautify: false, mangle: {keep_fnames: true}, comments: false}),
new CompressionPlugin(
{algorithm: 'gzip', regExp: /\.css$|\.html$|\.js$|\.map$/, threshold: 2 * 1024})
new UglifyJsPlugin({beautify: false, mangle: true, comments: false}),
new CompressionPlugin({algorithm: 'gzip', regExp: /\.html$|\.js$/, threshold: 2 * 1024})
]
});

0 comments on commit 7670aa0

Please sign in to comment.