MCPcopy
hub / github.com/webpack/webpack / createMultiCompiler

Function createMultiCompiler

test/ProgressPlugin.test.js:12–38  ·  view source on GitHub ↗
(
	/** @type {Record<string, unknown> | undefined} */ progressOptions = undefined,
	/** @type {Record<string, unknown> | undefined} */ configOptions = undefined
)

Source from the content-addressed store, hash-verified

10const expectNoDeprecations = require("./helpers/expectNoDeprecations");
11
12const createMultiCompiler = (
13 /** @type {Record<string, unknown> | undefined} */ progressOptions = undefined,
14 /** @type {Record<string, unknown> | undefined} */ configOptions = undefined
15) => {
16 const compiler = webpack(
17 Object.assign(
18 [
19 {
20 context: path.join(__dirname, "fixtures"),
21 entry: "./a.js"
22 },
23 {
24 context: path.join(__dirname, "fixtures"),
25 entry: "./b.js"
26 }
27 ],
28 configOptions
29 )
30 );
31 compiler.outputFileSystem = /** @type {import("../").OutputFileSystem} */ (
32 /** @type {unknown} */ (createFsFromVolume(new Volume()))
33 );
34
35 new webpack.ProgressPlugin(progressOptions).apply(compiler);
36
37 return compiler;
38};
39
40const createSimpleCompiler = (
41 /** @type {Record<string, unknown> | undefined} */ progressOptions = undefined

Callers 1

Calls 2

applyMethod · 0.65
webpackFunction · 0.50

Tested by

no test coverage detected