UNPKG

1.12 kBTypeScriptView Raw
1export declare enum messages {
2 compilationComplete = "Webpack compilation complete.",
3 startWatching = "Webpack compilation complete. Watching for file changes.",
4 changeDetected = "File change detected. Starting incremental webpack compilation..."
5}
6/**
7 * This little plugin will report the webpack state through the console.
8 * So the {N} CLI can get some idea when compilation completes.
9 */
10export declare class WatchStateLoggerPlugin {
11 isRunningWatching: boolean;
12 apply(compiler: any): void;
13 /**
14 * Rewrite an errored chunk to make the hot module replace successful.
15 * @param compiler the webpack compiler
16 * @param emittedFiles the emitted files from the current compilation
17 */
18 private static rewriteHotUpdateChunk;
19 private static findHotUpdateChunk;
20 /**
21 * Gets only the modules object after 'webpackHotUpdate("bundle",' in the chunk
22 */
23 private static getModulesObjectFromChunk;
24 /**
25 * Gets the webpackHotUpdate call with updated modules not to include the ones with errors
26 */
27 private static getWebpackHotUpdateReplacementContent;
28}