Added CSS Compression (Webpack 4 support)

This commit is contained in:
2018-07-11 08:02:08 +10:00
parent 8b7d74aaf4
commit 2bb6ca754d
2 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,7 @@
"mini-css-extract-plugin": "^0.4.1",
"node-sass": "^4.9.0",
"nodemailer": "^4.6.7",
"optimize-css-assets-webpack-plugin": "^4.0.3",
"pg-promise": "^8.4.4",
"react": "^16.4.0",
"react-dom": "^16.4.0",

View File

@ -28,7 +28,8 @@ const
HtmlWebpackPlugin = require('html-webpack-plugin'),
CompressionPlugin = require("compression-webpack-plugin"),
UglifyJsPlugin = require('uglifyjs-webpack-plugin'),
MiniCssExtractPlugin = require("mini-css-extract-plugin")
MiniCssExtractPlugin = require("mini-css-extract-plugin"),
OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
;
//Constants
@ -136,7 +137,8 @@ module.exports = function(server, app) {
output.optimization = {
minimize: true,
minimizer: [
UglifyPluginConfig
UglifyPluginConfig,
new OptimizeCSSAssetsPlugin({})
]
};