| | |
| | | /** @typedef {import("../ModuleGraphConnection").ConnectionState} ConnectionState */ |
| | | /** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */ |
| | | /** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */ |
| | | /** @typedef {import("./HarmonyExportInitFragment").UnusedExports} UnusedExports */ |
| | | /** @typedef {import("./HarmonyExportInitFragment").ExportMap} ExportMap */ |
| | | |
| | | class HarmonyExportSpecifierDependency extends NullDependency { |
| | | /** |
| | | * Creates an instance of HarmonyExportSpecifierDependency. |
| | | * @param {string} id the id |
| | | * @param {string} name the name |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Gets module evaluation side effects state. |
| | | * @param {ModuleGraph} moduleGraph the module graph |
| | | * @returns {ConnectionState} how this dependency connects the module to referencing modules |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Serializes this instance into the provided serializer context. |
| | | * @param {ObjectSerializerContext} context context |
| | | */ |
| | | serialize(context) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Restores this instance from the provided deserializer context. |
| | | * @param {ObjectDeserializerContext} context context |
| | | */ |
| | | deserialize(context) { |
| | |
| | | NullDependency.Template |
| | | ) { |
| | | /** |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Dependency} dependency the dependency for which the template should be applied |
| | | * @param {ReplaceSource} source the current replace source which can be modified |
| | | * @param {DependencyTemplateContext} templateContext the context object |
| | |
| | | .getExportsInfo(module) |
| | | .getUsedName(dep.name, runtime); |
| | | if (!used) { |
| | | /** @type {UnusedExports} */ |
| | | const set = new Set(); |
| | | set.add(dep.name || "namespace"); |
| | | initFragments.push( |
| | |
| | | return; |
| | | } |
| | | |
| | | /** @type {ExportMap} */ |
| | | const map = new Map(); |
| | | map.set(used, `/* binding */ ${dep.id}`); |
| | | initFragments.push( |