MCPcopy
hub / github.com/webpack/webpack / isUniversalTarget

Method isUniversalTarget

lib/RuntimeTemplate.js:138–145  ·  view source on GitHub ↗

* Whether the bundle targets node and web at once (universal `["node", "web"]` + `output.module`), like `isUniversalTarget` in `WebpackOptionsApply`. * @returns {boolean} true for a universal target

()

Source from the content-addressed store, hash-verified

136 * @returns {boolean} true for a universal target
137 */
138 isUniversalTarget() {
139 const { platform } = this.compilation.compiler;
140 return (
141 Boolean(this.outputOptions.module) &&
142 platform.node === null &&
143 platform.web === null
144 );
145 }
146
147 /**
148 * Runtime expression that is truthy in browser-like environments (a DOM

Callers 4

_getSourceDataMethod · 0.45
applyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected