WXL
3 天以前 2cc85c64f1c64a2dbaeae276a3e2ca8420de76b7
node_modules/webpack/lib/DelegatedModuleFactoryPlugin.js
@@ -9,12 +9,14 @@
/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptions} DllReferencePluginOptions */
/** @typedef {import("../declarations/plugins/DllReferencePlugin").DllReferencePluginOptionsContent} DllReferencePluginOptionsContent */
/** @typedef {import("./DelegatedModule").DelegatedModuleData} DelegatedModuleData */
/** @typedef {import("./DelegatedModule").DelegatedModuleSourceRequest} DelegatedModuleSourceRequest */
/** @typedef {import("./DelegatedModule").DelegatedModuleType} DelegatedModuleType */
/** @typedef {import("./NormalModuleFactory")} NormalModuleFactory */
/** @typedef {import("./util/identifier").AssociatedObjectForCache} AssociatedObjectForCache */
/**
 * Defines the options type used by this module.
 * @typedef {object} Options
 * @property {DelegatedModuleSourceRequest} source source
 * @property {NonNullable<DllReferencePluginOptions["context"]>} context absolute context path to which lib ident is relative to
@@ -29,6 +31,7 @@
class DelegatedModuleFactoryPlugin {
   /**
    * Creates an instance of DelegatedModuleFactoryPlugin.
    * @param {Options} options options
    */
   constructor(options) {
@@ -38,6 +41,7 @@
   }
   /**
    * Applies the plugin by registering its hooks on the compiler.
    * @param {NormalModuleFactory} normalModuleFactory the normal module factory
    * @returns {void}
    */
@@ -51,6 +55,7 @@
               const { request } = dependency;
               if (request && request.startsWith(`${scope}/`)) {
                  const innerRequest = `.${request.slice(scope.length)}`;
                  /** @type {undefined | DelegatedModuleData} */
                  let resolved;
                  if (innerRequest in this.options.content) {
                     resolved = this.options.content[innerRequest];