@roots/bud-extensions
Version:
bud.js core module
40 lines (39 loc) • 948 B
TypeScript
import type { Compilation, Compiler, WebpackError } from '@roots/bud-framework/config';
import { Extension } from '@roots/bud-framework/extension';
/**
* Webpack lifecycle plugin
*/
export default class BudWebpackLifecyclePlugin extends Extension {
/**
* {@link Extension.apply}
*/
apply(compiler: Compiler): void;
/**
* Asset emitted hook
*/
assetEmitted(file: string, info: {
compilation: Compilation;
content: string;
outputPath: string;
source: string;
targetPath: string;
}): void;
/**
* Before compile hook
*/
beforeCompile(compilation: Compilation): void;
/**
* After compile hook
*/
afterCompile(compilation: Compilation): void;
/**
* Failed hook
*/
failed(error: {
error?: Error;
} & Error & Partial<WebpackError>): void;
/**
* Should emit hook
*/
shouldEmit(): boolean;
}