From dab4bb43217fcb34e70192b97ec88a6a507e556c Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 30 Jun 2016 12:26:04 -0400 Subject: Some bundle size reductions and improvments (#3457) --- webapp/package.json | 1 + webapp/webpack.config.js | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'webapp') diff --git a/webapp/package.json b/webapp/package.json index 11264ec2d..83c3920a5 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -51,6 +51,7 @@ "file-loader": "0.8.5", "html-loader": "0.4.3", "imports-loader": "0.6.5", + "image-webpack-loader": "1.8.0", "jquery-deferred": "0.3.0", "jsdom": "9.0.0", "jsdom-global": "1.7.0", diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js index aaadb9de5..2911c0c7d 100644 --- a/webapp/webpack.config.js +++ b/webapp/webpack.config.js @@ -28,7 +28,8 @@ var config = { output: { path: 'dist', publicPath: '/static/', - filename: 'bundle.js' + filename: 'bundle.js', + chunkFilename: '[name].[hash].[chunkhash].js' }, module: { loaders: [ @@ -73,10 +74,10 @@ var config = { }, { test: /\.(png|eot|tiff|svg|woff2|woff|ttf|gif|mp3|jpg)$/, - loader: 'file', - query: { - name: 'files/[hash].[ext]' - } + loaders: [ + 'file?name=files/[hash].[ext]', + 'image-webpack' + ] }, { test: /\.html$/, @@ -108,10 +109,8 @@ var config = { }), new webpack.optimize.CommonsChunkPlugin({ minChunks: 2, - children: true, - name: 'main' + children: true }) - //new webpack.optimize.AggressiveMergingPlugin() ], resolve: { alias: { -- cgit v1.2.3-1-g7c22