MCPcopy
hub / github.com/webpack/webpack / run

Function run

test/HotModuleReplacementPlugin.test.js:418–430  ·  test/HotModuleReplacementPlugin.test.js::run
()

Source from the content-addressed store, hash-verified

416 plugins: [new webpack.HotModuleReplacementPlugin()]
417 });
418 const run = () =>
419 new Promise((resolve, reject) => {
420 compiler.run((err, _stats) => {
421 if (err) return reject(err);
422 const stats = /** @type {import(class="st">"../").Stats} */ (_stats);
423 if (stats.hasErrors()) {
424 return reject(
425 new Error(stats.toString({ all: false, errors: true }))
426 );
427 }
428 resolve(stats);
429 });
430 });
431
432 await run();
433 const before = new Set(fs.readdirSync(out));

Calls 4

resolveFunction · 0.85
runMethod · 0.45
hasErrorsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected