npm install purgecss-webpack-plugin
const PurgecssPlugin = require('purgecss-webpack-plugin')
.webpackConfig({
cache: true,
plugins: [
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './resources/**/*.php'),
path.join(__dirname, './resources/**/*.js'),
path.join(__dirname, './resources/**/*.vue')
]),
whitelistPatterns: [/^animation|cke|v-|active/]
}),
],
resolve: {
alias: {
'@': __dirname + '/resources/js'
},
}
})
plugins: [
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './resources/**/*.php'),
path.join(__dirname, './resources/**/*.js'),
path.join(__dirname, './resources/**/*.vue')
]),
whitelistPatterns: [/^animation|cke|v-|active/]
}),
],
success: function(json) {
...
}