Skip to content

Commit be896f2

Browse files
committed
fix bug
1 parent 3502287 commit be896f2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/dependencies/HarmonyExportImportedSpecifierDependency.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,9 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS
616616
}
617617

618618
getConditionalReexportStatement(module, key, name, valueKey) {
619+
if (valueKey === false) {
620+
return "/* unused export */\n";
621+
}
619622
const exportsName = module.exportsArgument;
620623
const returnValue = this.getReturnValue(name, valueKey);
621624
return `if(__webpack_require__.o(${name}, ${JSON.stringify(

lib/optimize/ConcatenatedModule.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ const getFinalName = (
132132
requestShortener,
133133
strictHarmonyModule
134134
);
135-
}
136-
if (!info.module.isUsed(directExport)) {
135+
} else if (!info.module.isUsed(exportName)) {
137136
return "/* unused export */ undefined";
138137
}
139138
const name = info.internalNames.get(directExport);

0 commit comments

Comments
 (0)