UNPKG

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