This commit is contained in:
Tobias Koppers 2018-06-23 15:27:10 +02:00
parent 3502287bbb
commit be896f2b34
2 changed files with 4 additions and 2 deletions

View File

@ -616,6 +616,9 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS
}
getConditionalReexportStatement(module, key, name, valueKey) {
if (valueKey === false) {
return "/* unused export */\n";
}
const exportsName = module.exportsArgument;
const returnValue = this.getReturnValue(name, valueKey);
return `if(__webpack_require__.o(${name}, ${JSON.stringify(

View File

@ -132,8 +132,7 @@ const getFinalName = (
requestShortener,
strictHarmonyModule
);
}
if (!info.module.isUsed(directExport)) {
} else if (!info.module.isUsed(exportName)) {
return "/* unused export */ undefined";
}
const name = info.internalNames.get(directExport);