MCPcopy
hub / github.com/webpack/webpack / apply

Method apply

lib/ProgressPlugin.js:275–288  ·  lib/ProgressPlugin.js::ProgressPlugin.apply

* Applies the plugin by registering its hooks on the compiler. * @param {Compiler | MultiCompiler} compiler webpack compiler * @returns {void}

(compiler)

Source from the content-addressed store, hash-verified

273 * @returns {void}
274 */
275 apply(compiler) {
276 const handler =
277 this.handler ||
278 createDefaultHandler(
279 this.profile,
280 compiler.getInfrastructureLogger(class="st">"webpack.Progress"),
281 this.progressBar
282 );
283 if (compiler instanceof MultiCompiler) {
284 this._applyOnMultiCompiler(compiler, handler);
285 } else if (compiler instanceof Compiler) {
286 this._applyOnCompiler(compiler, handler);
287 }
288 }
289
290 /**
291 * Apply on multi compiler.

Callers

nothing calls this directly

Calls 4

_applyOnMultiCompilerMethod · 0.95
_applyOnCompilerMethod · 0.95
createDefaultHandlerFunction · 0.85

Tested by

no test coverage detected