Skip to content

Commit

Permalink
fixes #7499
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 26, 2018
1 parent 8a7597a commit ab7ecb3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/optimize/ConcatenatedModule.js
Expand Up @@ -281,6 +281,7 @@ class ConcatenatedModule extends Module {

// Info from Factory
this.rootModule = rootModule;
this.factoryMeta = rootModule.factoryMeta;

// Info from Compilation
this.index = rootModule.index;
Expand Down
@@ -0,0 +1 @@
export const hello = 'world'
2 changes: 2 additions & 0 deletions test/cases/side-effects/missing-module-7499/example/index.js
@@ -0,0 +1,2 @@
import * as constants from './constants'
export { constants }
@@ -0,0 +1,3 @@
{
"sideEffects": false
}
10 changes: 10 additions & 0 deletions test/cases/side-effects/missing-module-7499/index.js
@@ -0,0 +1,10 @@
import './example'

it("should run correctly", function() {
return import('./lazy').then(lazy => {
expect(lazy.default()).toEqual({
hello: "world",
[Symbol.toStringTag]: "Module"
});
})
});
5 changes: 5 additions & 0 deletions test/cases/side-effects/missing-module-7499/lazy.js
@@ -0,0 +1,5 @@
import { constants } from './example'

export default function getConstants() {
return constants;
}

0 comments on commit ab7ecb3

Please sign in to comment.