Skip to content

Commit dd7b09b

Browse files
committed
Conditionall accumulate
1 parent d23f285 commit dd7b09b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

crates/next-api/src/project.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,11 @@ impl Project {
867867
} => {
868868
if !app_dir_only {
869869
endpoints.push(*html_endpoint);
870-
endpoints.push(*data_endpoint);
870+
// In development we want to include the data endpoint to support
871+
// server side changes. See PACK
872+
if self.next_mode().await?.is_development() {
873+
endpoints.push(*data_endpoint);
874+
}
871875
}
872876
}
873877
Route::PageApi { endpoint } => {

crates/next-core/src/next_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ impl NextConfig {
18241824
NextMode::Development => self
18251825
.experimental
18261826
.turbopack_use_production_chunking_in_dev
1827-
.unwrap_or(false),
1827+
.unwrap_or(true),
18281828
NextMode::Build => true,
18291829
}))
18301830
}
@@ -1836,7 +1836,7 @@ impl NextConfig {
18361836
if self
18371837
.experimental
18381838
.turbopack_use_production_chunking_in_dev
1839-
.unwrap_or(false)
1839+
.unwrap_or(true)
18401840
{
18411841
ChunkingStyle::production()
18421842
} else {

0 commit comments

Comments
 (0)