import type { Compiler, WebpackPluginInstance } from 'webpack'; import type { IScopedLogger } from '@rushstack/heft'; type ITerminal = IScopedLogger['terminal']; /** * In watch mode, deletes the output files that earlier compilations emitted and the current compilation * doesn't, such as the chunk of a dynamic import that was removed, or a file whose name contains a hash that * changed. Webpack's watch mode never deletes these files. * * @remarks * Unlike webpack's `output.clean`, this plugin deletes only files that the same compiler emitted earlier in * the session. Other files in the output folder, such as the outputs of other tasks, are never deleted. * * - The first compilation deletes nothing. * - A compilation with errors deletes nothing. The next compilation without errors deletes the files that it * doesn't emit from both compilations. * - A compilation that emits nothing (for example, one with errors when `optimization.emitOnErrors` is false) * doesn't reach this plugin, so the files on disk are still those of the previous emit. * - Hot update files are never deleted, because a client can still request them after the next compilation. * - Like `output.clean`, it never deletes a file that webpack writes outside the output folder, such as the * asset `../manifest.json`. Some plugins emit such files in the first compilation only. * - Like `output.clean`, if a plugin emits a file in the output folder in some compilations only, a * compilation that doesn't emit it deletes it. */ export declare class DeleteStaleAssetsPlugin implements WebpackPluginInstance { #private; constructor(terminal: ITerminal); apply(compiler: Compiler): void; } export {}; //# sourceMappingURL=DeleteStaleAssetsPlugin.d.ts.map