MCPcopy
hub / github.com/webpack/webpack / createStats

Function createStats

test/Compiler.test.js:523–539  ·  test/Compiler.test.js::createStats
(/** @type {import("../").Configuration} */ options)

Source from the content-addressed store, hash-verified

521
522 it(class="st">"should not emit compilation errors in async (watch)", async () => {
523 const createStats = (/** @type {import(class="st">"../").Configuration} */ options) =>
524 new Promise((resolve, reject) => {
525 const webpack = require(class="st">"..");
526
527 const c = webpack(options);
528 c.outputFileSystem = /** @type {import(class="st">"../").OutputFileSystem} */ (
529 /** @type {unknown} */ (createFsFromVolume(new Volume()))
530 );
531 const watching = /** @type {import(class="st">"../").Watching} */ (
532 c.watch({}, (err, stats) => {
533 /** @type {import(class="st">"../").Watching} */ (watching).close(() => {
534 if (err) return reject(err);
535 resolve(stats);
536 });
537 })
538 );
539 });
540 const stats = await createStats({
541 context: __dirname,
542 mode: class="st">"production",

Callers 1

Compiler.test.jsFile · 0.85

Calls 5

resolveFunction · 0.85
requireFunction · 0.70
webpackFunction · 0.50
watchMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected