File tree Expand file tree Collapse file tree 3 files changed +373
-5
lines changed Expand file tree Collapse file tree 3 files changed +373
-5
lines changed Original file line number Diff line number Diff line change 6262 "babel-plugin-transform-react-remove-prop-types" : " 0.4.24" ,
6363 "cross-env" : " 7.0.3" ,
6464 "css-loader" : " 6.7.2" ,
65+ "css-minimizer-webpack-plugin" : " ^4.2.2" ,
6566 "eslint" : " 8.28.0" ,
6667 "eslint-config-prettier" : " 8.5.0" ,
6768 "eslint-plugin-import" : " 2.26.0" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const webpack = require('webpack');
22const path = require ( 'path' ) ;
33const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
44const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
5+ const CssMinimizerPlugin = require ( 'css-minimizer-webpack-plugin' ) ;
56
67const sourceDirectory = path . resolve ( __dirname , 'examples/src' ) ;
78const targetDirectory = path . resolve ( __dirname , 'examples/dist' ) ;
@@ -38,6 +39,13 @@ module.exports = {
3839 entry : {
3940 app : './app.js' ,
4041 } ,
42+ optimization : {
43+ minimizer : [
44+ `...` ,
45+ new CssMinimizerPlugin ( ) ,
46+ ] ,
47+ } ,
48+ target : 'web' ,
4149 output : {
4250 path : targetDirectory ,
4351 chunkFilename : 'chunk-[chunkhash].js' ,
You can’t perform that action at this time.
0 commit comments