MCPcopy
hub / github.com/webpack/webpack / generate

Method generate

lib/runtime/BaseUriRuntimeModule.js:23–33  ·  view source on GitHub ↗

* Generates runtime code for this runtime module. * @returns {string | null} runtime code

()

Source from the content-addressed store, hash-verified

21 * @returns {string | null} runtime code
22 */
23 generate() {
24 const chunk = /** @type {Chunk} */ (this.chunk);
25 const options =
26 /** @type {EntryDescription} */
27 (chunk.getEntryOptions());
28 return `${RuntimeGlobals.baseURI} = ${
29 options.baseUri === undefined
30 ? "undefined"
31 : JSON.stringify(options.baseUri)
32 };`;
33 }
34}
35
36module.exports = BaseUriRuntimeModule;

Callers

nothing calls this directly

Calls 1

getEntryOptionsMethod · 0.80

Tested by

no test coverage detected