MCPcopy
hub / github.com/webpack/webpack / makeChunkUrlSentinel

Method makeChunkUrlSentinel

lib/html/HtmlGenerator.js:65–68  ·  view source on GitHub ↗

* Emit a sentinel for a chunk URL that can't be resolved at code-gen time * (chunk hashes aren't computed yet); `resolveChunkUrlSentinels` swaps it * for `${PUBLIC_PATH_AUTO}<chunkFilename>` once they are. * @param {Chunk} chunk chunk * @param {"javascript" | "css"} contentHashType which chu

(chunk, contentHashType)

Source from the content-addressed store, hash-verified

63 * @returns {string} sentinel
64 */
65 static makeChunkUrlSentinel(chunk, contentHashType) {
66 const hexId = Buffer.from(String(chunk.id), "utf8").toString("hex");
67 return `__WEBPACK_HTML_CHUNK_URL__${hexId}__${contentHashType}__END__`;
68 }
69
70 /**
71 * Replace every `makeChunkUrlSentinel` sentinel in `content` with

Callers 3

applyMethod · 0.80
buildSiblingMethod · 0.80
applyMethod · 0.80

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected