diff --git a/package.json b/package.json index 944c5ab..dcdc1e5 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/private/server/WebpackCompilerOptions.js b/private/server/WebpackCompilerOptions.js index fa52083..0b351b3 100644 --- a/private/server/WebpackCompilerOptions.js +++ b/private/server/WebpackCompilerOptions.js @@ -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({}) ] };