mirror of https://github.com/webpack/webpack.git
fix minor bug in concatenated modules
This commit is contained in:
parent
ab169893a1
commit
9aba345ae7
|
|
@ -200,7 +200,7 @@ const getExternalImport = (
|
|||
const used =
|
||||
exportName.length === 0 ||
|
||||
importedModule.getUsedName(moduleGraph, exportName);
|
||||
if (!used) return "/* unused reexport */undefined";
|
||||
if (!used) return "/* unused export */undefined";
|
||||
const comment = arrayEquals(used, exportName)
|
||||
? ""
|
||||
: Template.toNormalComment(`${exportName.join(".")}`);
|
||||
|
|
@ -1466,11 +1466,13 @@ class HarmonyExportExpressionDependencyConcatenatedTemplate extends DependencyTe
|
|||
|
||||
if (module === this.rootModule) {
|
||||
const used = module.getUsedName(moduleGraph, "default");
|
||||
const map = new Map();
|
||||
map.set(used, "__WEBPACK_MODULE_DEFAULT_EXPORT__");
|
||||
initFragments.push(
|
||||
new HarmonyExportInitFragment(module.exportsArgument, map)
|
||||
);
|
||||
if (used) {
|
||||
const map = new Map();
|
||||
map.set(used, "__WEBPACK_MODULE_DEFAULT_EXPORT__");
|
||||
initFragments.push(
|
||||
new HarmonyExportInitFragment(module.exportsArgument, map)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const content = `/* harmony default export */ ${
|
||||
|
|
|
|||
Loading…
Reference in New Issue