* Updates the hash with the data contributed by this instance. * @param {Hash} hash hash that will be modified * @param {UpdateHashContext} updateHashContext context for updating hash
(hash, updateHashContext)
| 599 | * @param {UpdateHashContext} updateHashContext context for updating hash |
| 600 | */ |
| 601 | updateHash(hash, updateHashContext) { |
| 602 | hash.update("html"); |
| 603 | // Source-type set changes when html-type exposure flips; the HMR shim's |
| 604 | // `extracting` branch changes when the emit decision flips. They differ |
| 605 | // only for `"inline"` (exposes html, but does not emit), so hash both. |
| 606 | if (this._shouldExposeHtmlType(updateHashContext.module)) { |
| 607 | hash.update("html-type"); |
| 608 | } |
| 609 | if (this._shouldExtract(updateHashContext.module)) { |
| 610 | hash.update("extract"); |
| 611 | } |
| 612 | // The HMR shim emits additional self-accept / DOM-patch code that |
| 613 | // isn't emitted in non-HMR builds, so the cached codegen must |
| 614 | // invalidate when `module.hot` toggles. |
| 615 | if (updateHashContext.module.hot) { |
| 616 | hash.update("hot"); |
| 617 | } |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | module.exports = HtmlGenerator; |
nothing calls this directly
no test coverage detected