Skip to content

Commit c08f4cd

Browse files
committed
chore: fix build of website
1 parent e4b9867 commit c08f4cd

File tree

3 files changed

+373
-5
lines changed

3 files changed

+373
-5
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
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",

webpack.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const webpack = require('webpack');
22
const path = require('path');
33
const HtmlWebpackPlugin = require('html-webpack-plugin');
44
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5+
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
56

67
const sourceDirectory = path.resolve(__dirname, 'examples/src');
78
const 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',

0 commit comments

Comments
 (0)