MCPcopy
hub / github.com/webpack/webpack / throwMissingModuleErrorBlock

Method throwMissingModuleErrorBlock

lib/RuntimeTemplate.js:546–551  ·  view source on GitHub ↗

* Throw missing module error block. * @param {object} options generation options * @param {string=} options.request request string used originally * @returns {string} generated error block

({ request })

Source from the content-addressed store, hash-verified

544 * @returns {string} generated error block
545 */
546 throwMissingModuleErrorBlock({ request }) {
547 const err = `Cannot find module '${request}'`;
548 return `${this.renderConst()} e = new Error(${JSON.stringify(
549 err
550 )}); e.code = 'MODULE_NOT_FOUND'; throw e;`;
551 }
552
553 /**
554 * Throw missing module error function.

Callers 4

checkExternalVariableFunction · 0.80
codeGenerationMethod · 0.80
codeGenerationMethod · 0.80

Calls 1

renderConstMethod · 0.95

Tested by

no test coverage detected