Skip to content

Commit 118e83c

Browse files
committed
fix a problem with missing modules in the bundle
when using harmony export * from
1 parent 4c2f9e7 commit 118e83c

6 files changed

Lines changed: 14 additions & 1 deletion

File tree

lib/dependencies/HarmonyExportImportedSpecifierDependency.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
3232
};
3333
}
3434

35-
if(!ignoreUnused && (!used || !this.originModule.usedExports)) {
35+
if(!ignoreUnused && (name ? !used : this.originModule.usedExports === false)) {
3636
return {
3737
type: "unused",
3838
name: name || "*"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import * as m from "m";
2+
3+
it("should handle unknown exports fine", function() {
4+
var x = m;
5+
x.should.be.eql({ foo: "foo" });
6+
});

test/cases/optimize/side-effects-reexport-start-unknown/node_modules/m/a.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cases/optimize/side-effects-reexport-start-unknown/node_modules/m/b.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cases/optimize/side-effects-reexport-start-unknown/node_modules/m/index.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cases/optimize/side-effects-reexport-start-unknown/node_modules/m/package.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)