add comment, optimize code

This commit is contained in:
Tobias Koppers 2019-10-30 09:25:35 +01:00
parent 9010d8bf77
commit 4479b6c660
1 changed files with 2 additions and 3 deletions

View File

@ -106,6 +106,7 @@ class SideEffectsFlagPlugin {
reexportMaps.set(module, (map = new Map()));
}
for (const [key, ids] of mode.map) {
// TODO Support reexporting namespace object
if (ids.length > 0 && !mode.checked.has(key)) {
map.set(key, {
module: moduleGraph.getModule(dep),
@ -144,9 +145,7 @@ class SideEffectsFlagPlugin {
}
// Update imports along the reexports from sideEffectFree modules
for (const pair of reexportMaps) {
const module = pair[0];
const map = pair[1];
for (const [module, map] of reexportMaps) {
for (const connection of moduleGraph.getIncomingConnections(
module
)) {