Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 23, 2018
1 parent 3502287 commit be896f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/dependencies/HarmonyExportImportedSpecifierDependency.js
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions lib/optimize/ConcatenatedModule.js
Expand Up @@ -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);
Expand Down

0 comments on commit be896f2

Please sign in to comment.