Merge pull request #7600 from webpack/bugfix/missing-module

fixes #7499
This commit is contained in:
Tobias Koppers 2018-06-26 16:12:36 +02:00 committed by GitHub
commit 258d9b6bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 0 deletions

View File

@ -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;

View File

@ -0,0 +1 @@
export const hello = 'world'

View File

@ -0,0 +1,2 @@
import * as constants from './constants'
export { constants }

View File

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

View File

@ -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"
});
})
});

View File

@ -0,0 +1,5 @@
import { constants } from './example'
export default function getConstants() {
return constants;
}