* Applies the plugin by registering its hooks on the compiler. * @param {Compiler | MultiCompiler} compiler webpack compiler * @returns {void}
(compiler)
| 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. |
nothing calls this directly
no test coverage detected