Added CSS Compression (Webpack 4 support)
This commit is contained in:
@ -41,6 +41,7 @@
|
|||||||
"mini-css-extract-plugin": "^0.4.1",
|
"mini-css-extract-plugin": "^0.4.1",
|
||||||
"node-sass": "^4.9.0",
|
"node-sass": "^4.9.0",
|
||||||
"nodemailer": "^4.6.7",
|
"nodemailer": "^4.6.7",
|
||||||
|
"optimize-css-assets-webpack-plugin": "^4.0.3",
|
||||||
"pg-promise": "^8.4.4",
|
"pg-promise": "^8.4.4",
|
||||||
"react": "^16.4.0",
|
"react": "^16.4.0",
|
||||||
"react-dom": "^16.4.0",
|
"react-dom": "^16.4.0",
|
||||||
|
@ -28,7 +28,8 @@ const
|
|||||||
HtmlWebpackPlugin = require('html-webpack-plugin'),
|
HtmlWebpackPlugin = require('html-webpack-plugin'),
|
||||||
CompressionPlugin = require("compression-webpack-plugin"),
|
CompressionPlugin = require("compression-webpack-plugin"),
|
||||||
UglifyJsPlugin = require('uglifyjs-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
|
//Constants
|
||||||
@ -136,7 +137,8 @@ module.exports = function(server, app) {
|
|||||||
output.optimization = {
|
output.optimization = {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
minimizer: [
|
||||||
UglifyPluginConfig
|
UglifyPluginConfig,
|
||||||
|
new OptimizeCSSAssetsPlugin({})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user