Skip to content

Instantly share code, notes, and snippets.

@dimti
Created February 19, 2021 10:38
Show Gist options
  • Save dimti/468b3793ec81d7c5b1f0f1e1669c2eb1 to your computer and use it in GitHub Desktop.
Save dimti/468b3793ec81d7c5b1f0f1e1669c2eb1 to your computer and use it in GitHub Desktop.
webpack config for demonstrate border-width cssnano bug
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