| | |
| | | |
| | | /** @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 |
| | |
| | | |
| | | class DelegatedModuleFactoryPlugin { |
| | | /** |
| | | * Creates an instance of DelegatedModuleFactoryPlugin. |
| | | * @param {Options} options options |
| | | */ |
| | | constructor(options) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {NormalModuleFactory} normalModuleFactory the normal module factory |
| | | * @returns {void} |
| | | */ |
| | |
| | | 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]; |