MCPcopy
hub / github.com/webpack/webpack / constructor

Method constructor

lib/RuntimeTemplate.js:105–117  ·  view source on GitHub ↗

* Creates an instance of RuntimeTemplate. * @param {Compilation} compilation the compilation * @param {OutputOptions} outputOptions the compilation output options * @param {RequestShortener} requestShortener the request shortener

(compilation, outputOptions, requestShortener)

Source from the content-addressed store, hash-verified

103 * @param {RequestShortener} requestShortener the request shortener
104 */
105 constructor(compilation, outputOptions, requestShortener) {
106 /** @type {Compilation} */
107 this.compilation = compilation;
108 this.outputOptions = /** @type {OutputOptions} */ (outputOptions || {});
109 /** @type {RequestShortener} */
110 this.requestShortener = requestShortener;
111 /** @type {string} */
112 this.globalObject =
113 /** @type {string} */
114 (getGlobalObject(outputOptions.globalObject));
115 /** @type {string} */
116 this.contentHashReplacement = "X".repeat(outputOptions.hashDigestLength);
117 }
118
119 isIIFE() {
120 return this.outputOptions.iife;

Callers

nothing calls this directly

Calls 1

getGlobalObjectFunction · 0.85

Tested by

no test coverage detected