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

Function createMultiCompiler

lib/webpack.js:59–73  ·  view source on GitHub ↗
(childOptions, options)

Source from the content-addressed store, hash-verified

57 * @returns {MultiCompiler} a multi-compiler
58 */
59const createMultiCompiler = (childOptions, options) => {
60 const compilers = childOptions.map((options, index) =>
61 createCompiler(options, index)
62 );
63 const compiler = new MultiCompiler(compilers, options);
64 for (const childCompiler of compilers) {
65 if (childCompiler.options.dependencies) {
66 compiler.setDependencies(
67 childCompiler,
68 childCompiler.options.dependencies
69 );
70 }
71 }
72 return compiler;
73};
74
75/**
76 * Creates a compiler.

Callers 1

createFunction · 0.70

Calls 2

setDependenciesMethod · 0.95
createCompilerFunction · 0.70

Tested by

no test coverage detected