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 #7842 from webpack/bugfix/override-entry
fix #7829
- Loading branch information
Showing
5 changed files
with
42 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
it("should load correct entry", function() { | ||
throw new Error("This entrypoint should not be used"); | ||
}); |
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,3 @@ | ||
it("should load correct entry", function() { | ||
// ok | ||
}); |
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,8 @@ | ||
module.exports = { | ||
findBundle: function() { | ||
return [ | ||
"./runtime~main.js", | ||
"./main.chunk.js" | ||
] | ||
} | ||
}; |
16 changes: 16 additions & 0 deletions
16
test/configCases/entry/override-entry-point/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,16 @@ | ||
const SingleEntryPlugin = require("../../../../lib/SingleEntryPlugin"); | ||
module.exports = { | ||
entry: () => ({}), | ||
optimization: { | ||
runtimeChunk: true | ||
}, | ||
output: { | ||
filename: "[name].js", | ||
chunkFilename: "[name].chunk.js" | ||
}, | ||
target: "web", | ||
plugins: [ | ||
new SingleEntryPlugin(__dirname, "./fail", "main"), | ||
new SingleEntryPlugin(__dirname, "./ok", "main") | ||
] | ||
}; |