1 | # Installation
|
2 | > `npm install --save @types/optimize-css-assets-webpack-plugin`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for optimize-css-assets-webpack-plugin (https://github.com/nmfr/optimize-css-assets-webpack-plugin).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/optimize-css-assets-webpack-plugin.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/optimize-css-assets-webpack-plugin/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for optimize-css-assets-webpack-plugin 5.0
|
12 | // Project: https://github.com/nmfr/optimize-css-assets-webpack-plugin
|
13 | // Definitions by: Armando Meziat <https://github.com/odnamrataizem>
|
14 | // Spencer Miskoviak <https://github.com/skovy>
|
15 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
16 | // TypeScript Version: 3.7
|
17 |
|
18 | import { WebpackPluginInstance as Plugin, Compiler } from 'webpack';
|
19 |
|
20 | export = OptimizeCssAssetsPlugin;
|
21 |
|
22 | declare namespace OptimizeCssAssetsPlugin {
|
23 | interface Options {
|
24 | /**
|
25 | * A regular expression that indicates the names of the assets that should
|
26 | * be optimized \ minimized. The regular expression provided is run against
|
27 | * the filenames of the files exported by the `ExtractTextPlugin` instances
|
28 | * in your configuration, not the filenames of your source CSS files
|
29 | *
|
30 | * @default /\.css$/g
|
31 | */
|
32 | assetNameRegExp?: RegExp | undefined;
|
33 | /**
|
34 | * The CSS processor used to optimize \ minimize the CSS. This should be a
|
35 | * function that follows `cssnano.process` interface (receives a CSS and
|
36 | * options parameters and returns a Promise).
|
37 | *
|
38 | * @default cssnano
|
39 | */
|
40 | cssProcessor?: {
|
41 | process: (css: string, options?: object) => PromiseLike<any>;
|
42 | } | undefined;
|
43 | /**
|
44 | * The options passed to the `cssProcessor`.
|
45 | *
|
46 | * @default {}
|
47 | */
|
48 | cssProcessorOptions?: object | undefined;
|
49 | /**
|
50 | * The plugin options passed to the `cssProcessor`.
|
51 | *
|
52 | * @default {}
|
53 | */
|
54 | cssProcessorPluginOptions?: object | undefined;
|
55 | /**
|
56 | * A boolean indicating if the plugin can print messages to the console.
|
57 | *
|
58 | * @default true
|
59 | */
|
60 | canPrint?: boolean | undefined;
|
61 | }
|
62 | }
|
63 |
|
64 | declare class OptimizeCssAssetsPlugin implements Plugin {
|
65 | constructor(options?: OptimizeCssAssetsPlugin.Options);
|
66 | apply(compiler: Compiler): void;
|
67 | }
|
68 |
|
69 | ````
|
70 |
|
71 | ### Additional Details
|
72 | * Last updated: Thu, 16 Dec 2021 22:32:03 GMT
|
73 | * Dependencies: [@types/webpack](https://npmjs.com/package/@types/webpack)
|
74 | * Global values: none
|
75 |
|
76 | # Credits
|
77 | These definitions were written by [Armando Meziat](https://github.com/odnamrataizem), and [Spencer Miskoviak](https://github.com/skovy).
|
78 |
|
\ | No newline at end of file |