MCPcopy
hub / github.com/webpack/webpack / _shouldExtract

Method _shouldExtract

lib/html/HtmlGenerator.js:185–190  ·  view source on GitHub ↗

* Whether to emit the extracted `.html` file for this module. * `options.extract === true` always extracts; `false` and `"inline"` never; * when the option is left unspecified, extraction defaults to on for HTML * modules used as compilation entries — that's the HTML-as-entry-point case. * @

(module)

Source from the content-addressed store, hash-verified

183 * @returns {boolean} true when the `.html` file should be emitted
184 */
185 _shouldExtract(module) {
186 const { extract } = this.options;
187 if (extract === true) return true;
188 if (extract === false || extract === "inline") return false;
189 return this._isEntryModule(module);
190 }
191
192 /**
193 * Whether this module exposes the `html` source type. Like `_shouldExtract`,

Callers 3

_shouldExposeHtmlTypeMethod · 0.95
generateMethod · 0.95
updateHashMethod · 0.95

Calls 1

_isEntryModuleMethod · 0.95

Tested by

no test coverage detected