MCPcopy Create free account
hub / github.com/webpack/webpack-cli / apply

Method apply

test/utils/webpack-cli-test-plugin.js:8–36  ·  view source on GitHub ↗
(compiler)

Source from the content-addressed store, hash-verified

6 }
7
8 apply(compiler) {
9 compiler.hooks.done.tap("webpack-cli Test Plugin", () => {
10 if (this.showHooks) {
11 const identifiers = this.showHooks.split(".");
12
13 let shown = compiler;
14
15 for (const identifier of identifiers) {
16 shown = shown[identifier];
17 }
18
19 console.log(shown);
20 }
21
22 if (this.showAll) {
23 console.log(compiler.options);
24 }
25
26 if (this.opts) {
27 this.opts.map((e) => {
28 const config = Object.getOwnPropertyDescriptor(compiler.options, e);
29
30 console.log(config.value);
31
32 return e;
33 });
34 }
35 });
36 }
37}
38
39module.exports = WebpackCLITestPlugin;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected