File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
purgecss-webpack-plugin/src
rollup-plugin-purgecss/__tests__ Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export default class PurgeCSSPlugin {
102102 if ( typeof options . safelist === "function" ) {
103103 options . safelist = options . safelist ( ) ;
104104 }
105-
105+
106106 if ( typeof options . blocklist === "function" ) {
107107 options . blocklist = options . blocklist ( ) ;
108108 }
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ export interface Extractors {
1717}
1818
1919type PathFunction = ( ) => string [ ] ;
20-
2120type SafelistFunction = ( ) => ComplexSafelist ;
21+ type BlocklistFunction = ( ) => StringRegExpArray ;
2222
2323export interface UserDefinedOptions {
2424 paths : string [ ] | PathFunction ;
@@ -34,7 +34,7 @@ export interface UserDefinedOptions {
3434 variables ?: boolean ;
3535 verbose ?: boolean ;
3636 safelist ?: StringRegExpArray | ComplexSafelist | SafelistFunction ;
37- blocklist ?: StringRegExpArray ;
37+ blocklist ?: StringRegExpArray | BlocklistFunction ;
3838 only ?: string [ ] ;
3939}
4040
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ describe("rollup-plugin-purgecss", () => {
1414 } ) ,
1515 ] ,
1616 } ) ;
17- await bundle . generate ( { format : "cjs" } ) ;
17+ await bundle . generate ( { format : "cjs" , exports : "auto" } ) ;
1818
1919 const actualA = fs
2020 . readFileSync ( path . resolve ( __dirname , "assets/actual_a.css" ) )
You can’t perform that action at this time.
0 commit comments