Skip to content

Commit 6422b97

Browse files
committed
Upgrade purgecss-webpack-plugin dependency
1 parent 9abf3be commit 6422b97

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@vue/cli-service": "^4.0.0",
1818
"filemanager-webpack-plugin": "^2.0.5",
1919
"glob-all": "^3.1.0",
20-
"purgecss-webpack-plugin": "^1.5.0",
20+
"purgecss-webpack-plugin": "^2.0.0",
2121
"purgecss-whitelister": "^2.1.0",
2222
"vue-template-compiler": "^2.6.0",
2323
"webpack-manifest-plugin": "^2.1.4"

vue.config.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ config = {
2525
purgecssWhitelistPatterns: [],
2626
};
2727

28-
// Custom PurgeCSS extractor for Tailwind that allows special characters in
29-
// class names.
30-
// https://github.com/FullHuman/purgecss#extractor
31-
class TailwindExtractor {
32-
static extract(content) {
33-
return content.match(/[A-z0-9-:\/]+/g) || [];
34-
}
35-
}
36-
3728
module.exports = {
3829
runtimeCompiler: true,
3930
publicPath: `${config.protocol}://${config.host}:${config.port}/`,
@@ -67,13 +58,7 @@ module.exports = {
6758
]),
6859
whitelist: whitelister(config.purgecssWhitelist),
6960
whitelistPatterns: config.purgecssWhitelistPatterns,
70-
extractors: [
71-
{
72-
extractor: TailwindExtractor,
73-
// Specify the file extensions to include when scanning for class names.
74-
extensions: ["html", "js", "twig", "vue"],
75-
},
76-
],
61+
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
7762
}),
7863
new FileManagerPlugin({
7964
onEnd: {

0 commit comments

Comments
 (0)