MCPcopy
hub / github.com/webpack/webpack / renderNodePrefixForCoreModule

Method renderNodePrefixForCoreModule

lib/RuntimeTemplate.js:244–248  ·  view source on GitHub ↗

* Renders node prefix for core module. * @param {string} mod a module * @returns {string} a module with `node:` prefix when supported, otherwise an original name

(mod)

Source from the content-addressed store, hash-verified

242 * @returns {string} a module with `node:` prefix when supported, otherwise an original name
243 */
244 renderNodePrefixForCoreModule(mod) {
245 return this.outputOptions.environment.nodePrefixForCoreModules
246 ? `"node:${mod}"`
247 : `"${mod}"`;
248 }
249
250 /**
251 * Renders return const when it is supported, otherwise let when supported, otherwise var.

Callers 7

generateMethod · 0.80
applyMethod · 0.80
applyMethod · 0.80
_generateBaseUriMethod · 0.80
generateMethod · 0.80
_generateBaseUriMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected