MCPcopy
hub / github.com/webpack/webpack / optional

Method optional

lib/Module.js:509–517  ·  view source on GitHub ↗

* @deprecated * @returns {boolean} true when optional, otherwise false

()

Source from the content-addressed store, hash-verified

507 * @returns {boolean} true when optional, otherwise false
508 */
509 get optional() {
510 return this.isOptional(
511 ModuleGraph.getModuleGraphForModule(
512 this,
513 "Module.optional",
514 "DEP_WEBPACK_MODULE_OPTIONAL"
515 )
516 );
517 }
518
519 /**
520 * Adds the provided chunk to the module.

Callers

nothing calls this directly

Calls 2

isOptionalMethod · 0.95

Tested by

no test coverage detected