* @private * @param {Compiler} compiler compiler * @returns {boolean} true when target is `web` or `universal`, otherwise false
(compiler)
| 589 | * @returns {boolean} true when target is `web` or `universal`, otherwise false |
| 590 | */ |
| 591 | static isWebTarget(compiler) { |
| 592 | const { platform } = compiler; |
| 593 | |
| 594 | // A `web` or universal target (`web` and `node` both `null`) injects the |
| 595 | // client. `target: false` is `null` everywhere, so it is excluded. |
| 596 | return Boolean( |
| 597 | platform.web || |
| 598 | /** @type {{ universal?: boolean | null }} */ (platform)?.universal || |
| 599 | (compiler.options.target !== false && |
| 600 | platform.web === null && |
| 601 | platform.node === null), |
| 602 | ); |
| 603 | } |
| 604 | |
| 605 | /** |
| 606 | * @private |
no outgoing calls
no test coverage detected