Set __esModule flag on import(...) namespace objects.

This small tweak would have made this commit unecessary:
1fac2ff3c1

Because we've already done the translation from CommonJS module.exports to
ES2015 namespace object, this flag should always be true.
This commit is contained in:
Ben Newman
2017-03-13 14:19:46 -04:00
parent b1aa458e38
commit 82e8d71e79

View File

@@ -178,5 +178,12 @@ function getNamespace(module, id) {
}
});
// This helps with Babel interop, since we're not just returning the
// module.exports object.
Object.defineProperty(namespace, "__esModule", {
value: true,
enumerable: false
});
return namespace;
}