Created
February 19, 2021 10:38
-
-
Save dimti/468b3793ec81d7c5b1f0f1e1669c2eb1 to your computer and use it in GitHub Desktop.
webpack config for demonstrate border-width cssnano bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const path = require('path'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); | |
module.exports = { | |
entry: './src/index.js', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js' | |
}, | |
plugins: [ | |
new MiniCssExtractPlugin(), | |
require('cssnano')({ | |
preset: 'default', | |
}), | |
], | |
module: { | |
rules: [ | |
{ | |
test: /\.css$/i, | |
use: [ | |
MiniCssExtractPlugin.loader, | |
'css-loader' | |
] | |
}, | |
], | |
}, | |
optimization: { | |
minimize: true, | |
minimizer: [ | |
new CssMinimizerPlugin(), | |
], | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment