1 | import webpack from 'webpack';
|
2 | declare type Attributes = Record<string, any>;
|
3 | declare type Context = {
|
4 | title?: string;
|
5 | htmlAttributes?: Attributes;
|
6 | cssAttributes?: Attributes;
|
7 | jsAttributes?: Attributes;
|
8 | };
|
9 | declare type Options = {
|
10 | filename?: string;
|
11 | publicPath?: string;
|
12 | context?: Context;
|
13 | template?: (args: Context | {
|
14 | css: string;
|
15 | js: string;
|
16 | publicPath: string;
|
17 | }) => string | Promise<string>;
|
18 | chunks?: string[];
|
19 | };
|
20 | declare function generateAttributes(attributes?: {}): string;
|
21 | declare function generateCSSReferences({ files, publicPath, attributes, }: {
|
22 | files: string[];
|
23 | publicPath: string;
|
24 | attributes: {
|
25 | rel?: string;
|
26 | };
|
27 | }): string;
|
28 | declare function generateJSReferences({ files, publicPath, attributes, }: {
|
29 | files?: never[] | undefined;
|
30 | publicPath?: string | undefined;
|
31 | attributes?: {} | undefined;
|
32 | }): string;
|
33 | declare function defaultTemplate({ css, js, publicPath, title, htmlAttributes, head, body, cssAttributes, jsAttributes, }: {
|
34 | css?: never[] | undefined;
|
35 | js?: never[] | undefined;
|
36 | publicPath?: string | undefined;
|
37 | title?: string | undefined;
|
38 | htmlAttributes?: {
|
39 | lang: string;
|
40 | } | undefined;
|
41 | head?: string | undefined;
|
42 | body?: string | undefined;
|
43 | cssAttributes?: {} | undefined;
|
44 | jsAttributes?: {} | undefined;
|
45 | }): string;
|
46 | declare class MiniHtmlWebpackPlugin implements webpack.Plugin {
|
47 | private options;
|
48 | constructor(options: Options);
|
49 | private plugin;
|
50 | apply(compiler: webpack.Compiler): void;
|
51 | }
|
52 | export { MiniHtmlWebpackPlugin as default, defaultTemplate, generateAttributes, generateCSSReferences, generateJSReferences, };
|