Compress CSS.
This commit is contained in:
parent
6bb672182a
commit
f23758e100
|
@ -43,5 +43,8 @@
|
||||||
"webpack-cli": "^4.7.0",
|
"webpack-cli": "^4.7.0",
|
||||||
"webpack-dev-server": "^3.11.2",
|
"webpack-dev-server": "^3.11.2",
|
||||||
"z-pagerouter": "^1.0.5"
|
"z-pagerouter": "^1.0.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"css-minimizer-webpack-plugin": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
var os = require("os");
|
var os = require("os");
|
||||||
|
|
||||||
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
||||||
|
@ -93,4 +95,17 @@ module.exports = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
optimization: {
|
||||||
|
minimize: true,
|
||||||
|
minimizer: [
|
||||||
|
`...`,
|
||||||
|
new TerserPlugin({
|
||||||
|
terserOptions: {
|
||||||
|
ecma: "2015"
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new CssMinimizerPlugin(),
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
Loading…
Reference in a new issue