1 | import { Compilation, Compiler, Stats } from 'webpack';
|
2 | export interface Options {
|
3 | |
4 |
|
5 |
|
6 |
|
7 |
|
8 | dry?: boolean;
|
9 | |
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | verbose?: boolean;
|
16 | |
17 |
|
18 |
|
19 |
|
20 |
|
21 | cleanStaleWebpackAssets?: boolean;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 | protectWebpackAssets?: boolean;
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | cleanOnceBeforeBuildPatterns?: string[];
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | cleanAfterEveryBuildPatterns?: string[];
|
46 | |
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | dangerouslyAllowCleanPatternsOutsideProject?: boolean;
|
54 | }
|
55 | declare class CleanWebpackPlugin {
|
56 | private readonly dry;
|
57 | private readonly verbose;
|
58 | private readonly cleanStaleWebpackAssets;
|
59 | private readonly protectWebpackAssets;
|
60 | private readonly cleanAfterEveryBuildPatterns;
|
61 | private readonly cleanOnceBeforeBuildPatterns;
|
62 | private readonly dangerouslyAllowCleanPatternsOutsideProject;
|
63 | private currentAssets;
|
64 | private initialClean;
|
65 | private outputPath;
|
66 | constructor(options?: Options);
|
67 | apply(compiler: Compiler): void;
|
68 | /**
|
69 | * Initially remove files from output directory prior to build.
|
70 | *
|
71 | * Only happens once.
|
72 | *
|
73 | * Warning: It is recommended to initially clean your build directory outside of webpack to minimize unexpected behavior.
|
74 | */
|
75 | handleInitial(compilation: Compilation): void;
|
76 | handleDone(stats: Stats): void;
|
77 | removeFiles(patterns: string[]): void;
|
78 | }
|
79 | export { CleanWebpackPlugin };
|
80 |
|
\ | No newline at end of file |