MCPcopy
hub / github.com/webpack/webpack / onceDone

Function onceDone

test/ChangesAndRemovals.test.js:43–50  ·  view source on GitHub ↗
(compiler, action)

Source from the content-addressed store, hash-verified

41 * @param {() => void} action action
42 */
43const onceDone = (compiler, action) => {
44 let initial = true;
45 compiler.hooks.done.tap("ChangesAndRemovalsTest", () => {
46 if (!initial) return;
47 initial = false;
48 setTimeout(action, 1000);
49 });
50};
51
52/**
53 * @param {import("../").Compiler} compiler compiler

Callers 1

Calls 1

tapMethod · 0.80

Tested by

no test coverage detected