Skip to content

Commit 0148cea

Browse files
authored
feat: add option blocklist to webpack plugin (#610)
1 parent 824e208 commit 0148cea

File tree

1 file changed

+5
-0
lines changed
  • packages/purgecss-webpack-plugin/src

1 file changed

+5
-0
lines changed

packages/purgecss-webpack-plugin/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ export default class PurgeCSSPlugin {
102102
if (typeof options.safelist === "function") {
103103
options.safelist = options.safelist();
104104
}
105+
106+
if (typeof options.blocklist === "function") {
107+
options.blocklist = options.blocklist();
108+
}
105109

106110
const purgecss = await new PurgeCSS().purge({
107111
content: options.content,
@@ -114,6 +118,7 @@ export default class PurgeCSSPlugin {
114118
rejected: options.rejected,
115119
variables: options.variables,
116120
safelist: options.safelist,
121+
blocklist: options.blocklist,
117122
});
118123
const purged = purgecss[0];
119124

0 commit comments

Comments
 (0)