1 | import { Compiler, WebpackPluginInstance as Plugin } from "webpack";
|
2 |
|
3 | export = OptimizeCssAssetsPlugin;
|
4 |
|
5 | declare namespace OptimizeCssAssetsPlugin {
|
6 | interface Options {
|
7 | /**
|
8 | * A regular expression that indicates the names of the assets that should
|
9 | * be optimized \ minimized. The regular expression provided is run against
|
10 | * the filenames of the files exported by the `ExtractTextPlugin` instances
|
11 | * in your configuration, not the filenames of your source CSS files
|
12 | *
|
13 | * @default /\.css$/g
|
14 | */
|
15 | assetNameRegExp?: RegExp | undefined;
|
16 | /**
|
17 | * The CSS processor used to optimize \ minimize the CSS. This should be a
|
18 | * function that follows `cssnano.process` interface (receives a CSS and
|
19 | * options parameters and returns a Promise).
|
20 | *
|
21 | * @default cssnano
|
22 | */
|
23 | cssProcessor?: {
|
24 | process: (css: string, options?: object) => PromiseLike<any>;
|
25 | } | undefined;
|
26 | /**
|
27 | * The options passed to the `cssProcessor`.
|
28 | *
|
29 | * @default {}
|
30 | */
|
31 | cssProcessorOptions?: object | undefined;
|
32 | /**
|
33 | * The plugin options passed to the `cssProcessor`.
|
34 | *
|
35 | * @default {}
|
36 | */
|
37 | cssProcessorPluginOptions?: object | undefined;
|
38 | /**
|
39 | * A boolean indicating if the plugin can print messages to the console.
|
40 | *
|
41 | * @default true
|
42 | */
|
43 | canPrint?: boolean | undefined;
|
44 | }
|
45 | }
|
46 |
|
47 | declare class OptimizeCssAssetsPlugin implements Plugin {
|
48 | constructor(options?: OptimizeCssAssetsPlugin.Options);
|
49 | apply(compiler: Compiler): void;
|
50 | }
|