UNPKG

1.21 kBTypeScriptView Raw
1import { Compiler, WebpackPluginInstance } from 'webpack';
2import { FileDescriptor } from './helpers';
3import { getCompilerHooks } from './hooks';
4export declare type Manifest = Record<string, any>;
5export interface InternalOptions {
6 [key: string]: any;
7 assetHookStage: number;
8 basePath: string;
9 fileName: string;
10 filter: (file: FileDescriptor) => Boolean;
11 generate: (seed: Record<any, any>, files: FileDescriptor[], entries: Record<string, string[]>) => Manifest;
12 map: (file: FileDescriptor) => FileDescriptor;
13 publicPath: string;
14 removeKeyHash: RegExp | false;
15 seed: Record<any, any>;
16 serialize: (manifest: Manifest) => string;
17 sort: (fileA: FileDescriptor, fileB: FileDescriptor) => Number;
18 transformExtensions: RegExp;
19 useEntryKeys: Boolean;
20 useLegacyEmit: Boolean;
21 writeToFileEmit: Boolean;
22}
23export declare type ManifestPluginOptions = Partial<InternalOptions>;
24export declare type EmitCountMap = Map<any, any>;
25declare class WebpackManifestPlugin implements WebpackPluginInstance {
26 private options;
27 constructor(opts: ManifestPluginOptions);
28 apply(compiler: Compiler): void;
29}
30export { getCompilerHooks, WebpackManifestPlugin };