Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10133 from webpack/bugfix/issue-10104
fixes missing `__webpack_require__.e` in concatenated modules
- Loading branch information
Showing
9 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test/configCases/concatenate-modules/load-chunk-function/a.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import "./c"; | ||
export default import("./b"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 'b'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default 'c'; |
7 changes: 7 additions & 0 deletions
7
test/configCases/concatenate-modules/load-chunk-function/entry1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import a from "./a"; | ||
import b from "./b"; | ||
|
||
it("should load fine", () => { | ||
expect(b).toBe("b"); | ||
return a.then(a => expect(a).toEqual(nsObj({ default: "b" }))); | ||
}); |
5 changes: 5 additions & 0 deletions
5
test/configCases/concatenate-modules/load-chunk-function/entry2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import a from "./a"; | ||
|
||
it("should load fine", () => { | ||
return a.then(a => expect(a).toEqual(nsObj({ default: "b" }))); | ||
}); |
5 changes: 5 additions & 0 deletions
5
test/configCases/concatenate-modules/load-chunk-function/test.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
findBundle: function(i, options) { | ||
return ["entry1.js", "entry2.js"]; | ||
} | ||
}; |
12 changes: 12 additions & 0 deletions
12
test/configCases/concatenate-modules/load-chunk-function/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
entry: { | ||
entry1: "./entry1", | ||
entry2: "./entry2" | ||
}, | ||
output: { | ||
filename: "[name].js" | ||
}, | ||
optimization: { | ||
concatenateModules: true | ||
} | ||
}; |