1 | import { Compilation, Compiler } from "webpack";
|
2 | type StringRegExpArray = Array<RegExp | string>;
|
3 | type ComplexSafelist = {
|
4 | standard?: StringRegExpArray;
|
5 | deep?: RegExp[];
|
6 | greedy?: RegExp[];
|
7 | variables?: StringRegExpArray;
|
8 | keyframes?: StringRegExpArray;
|
9 | };
|
10 | type ExtractorFunction$0<T = string> = (content: T) => string[];
|
11 | interface Extractors$0 {
|
12 | extensions: string[];
|
13 | extractor: ExtractorFunction$0;
|
14 | }
|
15 | type PathFunction = () => string[];
|
16 | type SafelistFunction = () => ComplexSafelist;
|
17 | type BlocklistFunction = () => StringRegExpArray;
|
18 | interface UserDefinedOptions$0 {
|
19 | paths: string[] | PathFunction;
|
20 | defaultExtractor?: ExtractorFunction$0;
|
21 | extractors?: Array<Extractors$0>;
|
22 | fontFace?: boolean;
|
23 | keyframes?: boolean;
|
24 | moduleExtensions?: string[];
|
25 | output?: string;
|
26 | rejected?: boolean;
|
27 | stdin?: boolean;
|
28 | stdout?: boolean;
|
29 | variables?: boolean;
|
30 | verbose?: boolean;
|
31 | safelist?: StringRegExpArray | ComplexSafelist | SafelistFunction;
|
32 | blocklist?: StringRegExpArray | BlocklistFunction;
|
33 | skippedContentGlobs?: Array<string>;
|
34 | dynamicAttributes?: string[];
|
35 | only?: string[];
|
36 | }
|
37 | type PurgedStats = {
|
38 | [index: string]: string[];
|
39 | };
|
40 | declare class PurgeCSSPlugin {
|
41 | options: UserDefinedOptions$0;
|
42 | purgedStats: PurgedStats;
|
43 | constructor(options: UserDefinedOptions$0);
|
44 | apply(compiler: Compiler): void;
|
45 | initializePlugin(compilation: Compilation): void;
|
46 | runPluginHook(compilation: Compilation, entryPaths: string[]): Promise<void>;
|
47 | }
|
48 | export { PurgeCSSPlugin as default };
|