updated npm modules
This commit is contained in:
28
node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js
generated
vendored
28
node_modules/webpack/lib/dependencies/HarmonyExportImportedSpecifierDependency.js
generated
vendored
@@ -50,6 +50,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
) {
|
||||
super(request, originModule, sourceOrder, parserScope);
|
||||
this.id = id;
|
||||
this.redirectedId = undefined;
|
||||
this.name = name;
|
||||
this.activeExports = activeExports;
|
||||
this.otherStarExports = otherStarExports;
|
||||
@@ -60,9 +61,13 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
return "harmony export imported specifier";
|
||||
}
|
||||
|
||||
get _id() {
|
||||
return this.redirectedId || this.id;
|
||||
}
|
||||
|
||||
getMode(ignoreUnused) {
|
||||
const name = this.name;
|
||||
const id = this.id;
|
||||
const id = this._id;
|
||||
const used = this.originModule.isUsed(name);
|
||||
const importedModule = this._module;
|
||||
|
||||
@@ -288,7 +293,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
};
|
||||
}
|
||||
|
||||
const importedModule = this.module;
|
||||
const importedModule = this._module;
|
||||
|
||||
if (!importedModule) {
|
||||
// no imported module available
|
||||
@@ -350,11 +355,11 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
// It's not an harmony module
|
||||
if (
|
||||
this.originModule.buildMeta.strictHarmonyModule &&
|
||||
this.id !== "default"
|
||||
this._id !== "default"
|
||||
) {
|
||||
// In strict harmony modules we only support the default export
|
||||
const exportName = this.id
|
||||
? `the named export '${this.id}'`
|
||||
const exportName = this._id
|
||||
? `the named export '${this._id}'`
|
||||
: "the namespace object";
|
||||
return [
|
||||
new HarmonyLinkingError(
|
||||
@@ -365,20 +370,20 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.id) {
|
||||
if (!this._id) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (importedModule.isProvided(this.id) !== false) {
|
||||
if (importedModule.isProvided(this._id) !== false) {
|
||||
// It's provided or we are not sure
|
||||
return;
|
||||
}
|
||||
|
||||
// We are sure that it's not provided
|
||||
const idIsNotNameMessage =
|
||||
this.id !== this.name ? ` (reexported as '${this.name}')` : "";
|
||||
this._id !== this.name ? ` (reexported as '${this.name}')` : "";
|
||||
const errorMessage = `"export '${
|
||||
this.id
|
||||
this._id
|
||||
}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
|
||||
return [new HarmonyLinkingError(errorMessage)];
|
||||
}
|
||||
@@ -402,6 +407,11 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||
importedModule.used + stringifiedUsedExport + stringifiedProvidedExport
|
||||
);
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
super.disconnect();
|
||||
this.redirectedId = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = HarmonyExportImportedSpecifierDependency;
|
||||
|
||||
Reference in New Issue
Block a user