MCPcopy
hub / github.com/webpack/webpack / createSimpleCompiler

Function createSimpleCompiler

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

Source from the content-addressed store, hash-verified

38};
39
40const createSimpleCompiler = (
41 /** @type {Record<string, unknown> | undefined} */ progressOptions = undefined
42) => {
43 const compiler = webpack({
44 context: path.join(__dirname, "fixtures"),
45 entry: "./a.js",
46 infrastructureLogging: {
47 debug: /Progress/
48 },
49 plugins: [
50 new webpack.ProgressPlugin({
51 activeModules: true,
52 ...progressOptions
53 })
54 ]
55 });
56
57 compiler.outputFileSystem = /** @type {import("../").OutputFileSystem} */ (
58 /** @type {unknown} */ (createFsFromVolume(new Volume()))
59 );
60
61 return compiler;
62};
63
64const createSimpleCompilerWithCustomHandler = (
65 /** @type {Record<string, unknown> | undefined} */ options = undefined

Callers 1

Calls 1

webpackFunction · 0.50

Tested by

no test coverage detected