UNPKG

1.08 kBTypeScriptView Raw
1import { Compiler, Module, Compilation, LoaderContext } from 'webpack';
2import { EmitCountMap, InternalOptions } from './';
3interface BeforeRunHookArgs {
4 emitCountMap: EmitCountMap;
5 manifestFileName: string;
6}
7interface EmitHookArgs {
8 compiler: Compiler;
9 emitCountMap: EmitCountMap;
10 manifestAssetId: string;
11 manifestFileName: string;
12 moduleAssets: Record<any, any>;
13 options: InternalOptions;
14}
15declare const getCompilerHooks: (compiler: Compiler) => any;
16declare const beforeRunHook: ({ emitCountMap, manifestFileName }: BeforeRunHookArgs, _: Compiler, callback: Function) => void;
17declare const emitHook: ({ compiler, emitCountMap, manifestAssetId, manifestFileName, moduleAssets, options }: EmitHookArgs, compilation: Compilation) => void;
18interface LegacyModule extends Module {
19 userRequest?: any;
20}
21declare const normalModuleLoaderHook: ({ moduleAssets }: {
22 moduleAssets: Record<any, any>;
23}, loaderContext: LoaderContext<any>, module: LegacyModule) => void;
24export { beforeRunHook, emitHook, getCompilerHooks, normalModuleLoaderHook };