Skip to content

Commit

Permalink
chore: fix build of website
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Nov 27, 2022
1 parent e4b9867 commit c08f4cd
Show file tree
Hide file tree
Showing 3 changed files with 373 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"cross-env": "7.0.3",
"css-loader": "6.7.2",
"css-minimizer-webpack-plugin": "^4.2.2",
"eslint": "8.28.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0",
Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const webpack = require('webpack');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');

const sourceDirectory = path.resolve(__dirname, 'examples/src');
const targetDirectory = path.resolve(__dirname, 'examples/dist');
Expand Down Expand Up @@ -38,6 +39,13 @@ module.exports = {
entry: {
app: './app.js',
},
optimization: {
minimizer: [
`...`,
new CssMinimizerPlugin(),
],
},
target: 'web',
output: {
path: targetDirectory,
chunkFilename: 'chunk-[chunkhash].js',
Expand Down
Loading

0 comments on commit c08f4cd

Please sign in to comment.