diff --git a/package.json b/package.json index b021dac4..561be8d4 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,14 @@ "css-loader": "^0.28.10", "exif-js": "^2.3.0", "html-loader": "^0.4.5", - "html-webpack-plugin": "^2.28.0", + "html-webpack-plugin": "^3.2.0", "node-sass": "^4.10.0", "prop-types": "^15.5.10", "react": "^15.6.2", - "react-dom": "^15.6.2", "react-addons-css-transition-group": "^15.6.2", "react-dnd": "^2.4.0", "react-dnd-html5-backend-filedrop": "^1.0.0", + "react-dom": "^15.6.2", "react-draggable": "^2.2.6", "react-infinite-scroller": "^1.1.4", "react-router": "^4.1.1", diff --git a/webpack.config.js b/webpack.config.js index 61a2041f..9f366149 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -57,7 +57,13 @@ let config = { new webpack.optimize.OccurrenceOrderPlugin(), new HtmlWebpackPlugin({ template: path.join(__dirname, 'client', 'index.html'), - inject: true + inject: true, + minify: { + collapseWhitespace: true, + removeComments: true, + minifyJS: true, + minifyCSS: true, + } }), new CopyWebpackPlugin([ { from: 'manifest.json', to: "assets/" }, @@ -73,7 +79,8 @@ let config = { if (process.env.NODE_ENV === 'production') { config.plugins.push(new UglifyJSPlugin({ - sourceMap: false + sourceMap: false, + extractComments: true, })); config.plugins.push(new CompressionPlugin({ asset: "[path].gz[query]",