fix a problem with missing modules in the bundle

when using harmony export * from
This commit is contained in:
Tobias Koppers 2017-10-12 14:14:29 +02:00
parent 4c2f9e724b
commit 118e83c3ed
6 changed files with 14 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
};
}
if(!ignoreUnused && (!used || !this.originModule.usedExports)) {
if(!ignoreUnused && (name ? !used : this.originModule.usedExports === false)) {
return {
type: "unused",
name: name || "*"

View File

@ -0,0 +1,6 @@
import * as m from "m";
it("should handle unknown exports fine", function() {
var x = m;
x.should.be.eql({ foo: "foo" });
});

View File

@ -0,0 +1 @@
export var foo = "foo";

View File

@ -0,0 +1 @@
// empty

View File

@ -0,0 +1,2 @@
export * from "./a";
export * from "./b";

View File

@ -0,0 +1,3 @@
{
"side-effects": false
}