-
-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(incremental): build chunk graph not build new added entry (#9225)
- Loading branch information
Showing
6 changed files
with
49 additions
and
0 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
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/entries/dynamic-entries/0/index0.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,3 @@ | ||
it("should have correct entrypoints", function() { | ||
expect(Object.keys(__STATS__.entrypoints)).toEqual(["bundle0"]); | ||
}) |
3 changes: 3 additions & 0 deletions
3
packages/rspack-test-tools/tests/watchCases/entries/dynamic-entries/1/index0.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,3 @@ | ||
it("should have correct entrypoints", function() { | ||
expect(Object.keys(__STATS__.entrypoints)).toEqual(["bundle0", "bundle1"]); | ||
}) |
1 change: 1 addition & 0 deletions
1
packages/rspack-test-tools/tests/watchCases/entries/dynamic-entries/1/index1.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 @@ | ||
console.log.bind(console, 1); |
27 changes: 27 additions & 0 deletions
27
packages/rspack-test-tools/tests/watchCases/entries/dynamic-entries/rspack.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,27 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const rspack = require("@rspack/core"); | ||
|
||
let compiler; | ||
|
||
/** @type {import("@rspack/core").Configuration} */ | ||
module.exports = { | ||
entry: async () => { | ||
const context = compiler.context; | ||
const files = await fs.promises.readdir(context); | ||
let entries = files.filter(f => f.startsWith("index")); | ||
entries.sort(); | ||
return entries.reduce((acc, e, i) => { | ||
acc[`bundle${i}`] = path.resolve(context, e); | ||
return acc; | ||
}, {}); | ||
}, | ||
output: { | ||
filename: "[name].js" | ||
}, | ||
plugins: [ | ||
function (c) { | ||
compiler = c; | ||
} | ||
] | ||
}; |
5 changes: 5 additions & 0 deletions
5
packages/rspack-test-tools/tests/watchCases/entries/dynamic-entries/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(i) { | ||
return ["bundle0.js"]; | ||
} | ||
}; |
2adb783
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Ecosystem CI detail: Open
2adb783
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 Benchmark detail: Open