File tree 3 files changed +373
-5
lines changed
3 files changed +373
-5
lines changed Original file line number Diff line number Diff line change 62
62
"babel-plugin-transform-react-remove-prop-types" : " 0.4.24" ,
63
63
"cross-env" : " 7.0.3" ,
64
64
"css-loader" : " 6.7.2" ,
65
+ "css-minimizer-webpack-plugin" : " ^4.2.2" ,
65
66
"eslint" : " 8.28.0" ,
66
67
"eslint-config-prettier" : " 8.5.0" ,
67
68
"eslint-plugin-import" : " 2.26.0" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const webpack = require('webpack');
2
2
const path = require ( 'path' ) ;
3
3
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
4
4
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
5
+ const CssMinimizerPlugin = require ( 'css-minimizer-webpack-plugin' ) ;
5
6
6
7
const sourceDirectory = path . resolve ( __dirname , 'examples/src' ) ;
7
8
const targetDirectory = path . resolve ( __dirname , 'examples/dist' ) ;
@@ -38,6 +39,13 @@ module.exports = {
38
39
entry : {
39
40
app : './app.js' ,
40
41
} ,
42
+ optimization : {
43
+ minimizer : [
44
+ `...` ,
45
+ new CssMinimizerPlugin ( ) ,
46
+ ] ,
47
+ } ,
48
+ target : 'web' ,
41
49
output : {
42
50
path : targetDirectory ,
43
51
chunkFilename : 'chunk-[chunkhash].js' ,
You can’t perform that action at this time.
0 commit comments