const path = require('path')
const glob = require('glob-all')
const PurgecssPlugin = require('purgecss-webpack-plugin')
module.exports = {
plugins: [
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, 'src/**/*.html'),
path.join(__dirname, 'src/**/*.js')
])
})
]
}
const path = require('path')
const glob = require('glob-all')
const PurgecssPlugin = require('purgecss-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader'
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css'
}),
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, 'src/**/*.html'),
path.join(__dirname, 'src/**/*.js'),
path.join(__dirname, 'src/**/*.vue')
]),
safelist: {
standard: ['body', 'html'],
deep: [/^dropdown-/],
greedy: [/^bg-/]
},
keyframes: true,
fontFace: true
})
]
}