mirror of https://github.com/webpack/webpack.git
Merge pull request #7445 from webpack/bugfix/no-id
rewrite module reference correctly after replacing ConcatenatedModule
This commit is contained in:
commit
66cd9b7c80
|
|
@ -286,7 +286,13 @@ class ModuleConcatenationPlugin {
|
|||
}
|
||||
compilation.modules.push(newModule);
|
||||
for (const reason of newModule.reasons) {
|
||||
reason.dependency.module = newModule;
|
||||
if (reason.dependency.module === concatConfiguration.rootModule)
|
||||
reason.dependency.module = newModule;
|
||||
if (
|
||||
reason.dependency.redirectedModule ===
|
||||
concatConfiguration.rootModule
|
||||
)
|
||||
reason.dependency.redirectedModule = newModule;
|
||||
}
|
||||
// TODO: remove when LTS node version contains fixed v8 version
|
||||
// @see https://github.com/webpack/webpack/pull/6613
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import { a } from "pmodule";
|
||||
|
||||
it("should not crash with null id", function() {
|
||||
expect(a).toBe("a");
|
||||
});
|
||||
|
||||
if(Math === undefined)
|
||||
console.log(module); // prevent scope hoisting of this module
|
||||
Loading…
Reference in New Issue