Skip to content

Commit 7969ce0

Browse files
committed
fix incremental forget new entries
1 parent 81c1a2e commit 7969ce0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

crates/rspack_core/src/build_chunk_graph/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// use rspack_core::Bundle;
22
// use rspack_core::ChunkGraph;
33

4+
use incremental::ChunkReCreation;
45
use tracing::instrument;
56

67
use crate::{incremental::IncrementalPasses, Compilation};
@@ -23,6 +24,16 @@ pub(crate) fn build_chunk_graph(compilation: &mut Compilation) -> rspack_error::
2324
if !enable_incremental || splitter.chunk_group_infos.is_empty() {
2425
let inputs = splitter.prepare_input_entrypoints_and_modules(compilation)?;
2526
splitter.prepare_entries(inputs, compilation)?;
27+
} else if compilation.entries.len() > compilation.entrypoints.len() {
28+
let more_entries = compilation
29+
.entries
30+
.keys()
31+
.filter(|entry| !compilation.entrypoints.contains_key(entry.as_str()))
32+
.map(|entry| ChunkReCreation::Entry(entry.to_owned()))
33+
.collect::<Vec<_>>();
34+
for entry in more_entries {
35+
entry.rebuild(&mut splitter, compilation)?;
36+
}
2637
}
2738

2839
splitter.split(compilation)?;

packages/rspack/src/Compilation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,6 @@ class AddIncludeDispatcher {
12651265
this.#args = [];
12661266
const cbs = this.#cbs;
12671267
this.#cbs = [];
1268-
console.log("args.length", args.length);
12691268
this.#inner(args, (wholeErr, results) => {
12701269
if (this.#args.length !== 0) {
12711270
queueMicrotask(this.#execute);

0 commit comments

Comments
 (0)