MCPcopy
hub / github.com/webpack/webpack / createCompiler

Function createCompiler

test/WatcherEvents.test.js:12–26  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

10 * @returns {import("../").Compiler | import("../").MultiCompiler} compiler instance
11 */
12const createCompiler = (config) => {
13 const compiler =
14 /** @type {import("../").Compiler | import("../").MultiCompiler} */ (
15 webpack(
16 /** @type {import("../").Configuration} */ (
17 /** @type {unknown} */ (config)
18 )
19 )
20 );
21 /** @type {import("../").Compiler} */ (compiler).outputFileSystem =
22 /** @type {import("../").OutputFileSystem} */ (
23 /** @type {unknown} */ (createFsFromVolume(new Volume()))
24 );
25 return compiler;
26};
27
28const createSingleCompiler = () =>
29 createCompiler({

Callers 2

createSingleCompilerFunction · 0.70
createMultiCompilerFunction · 0.70

Calls 1

webpackFunction · 0.50

Tested by

no test coverage detected