Skip to content

Commit 86e006b

Browse files
authored
Turbopack: debug ids for server chunks (#84557)
Looks like #84319 forgot to enable them for the server chunks
1 parent 8d7dfab commit 86e006b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

crates/next-api/src/project.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,7 @@ impl Project {
10731073
turbo_source_maps: self.next_config().server_source_maps(),
10741074
no_mangling: self.no_mangling(),
10751075
scope_hoisting: self.next_config().turbo_scope_hoisting(self.next_mode()),
1076+
debug_ids: self.next_config().turbopack_debug_ids(),
10761077
};
10771078
Ok(if client_assets {
10781079
get_server_chunking_context_with_client_assets(

crates/next-core/src/next_server/context.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,7 @@ pub struct ServerChunkingContextOptions {
993993
pub turbo_source_maps: Vc<bool>,
994994
pub no_mangling: Vc<bool>,
995995
pub scope_hoisting: Vc<bool>,
996+
pub debug_ids: Vc<bool>,
996997
}
997998

998999
#[turbo_tasks::function]
@@ -1013,6 +1014,7 @@ pub async fn get_server_chunking_context_with_client_assets(
10131014
turbo_source_maps,
10141015
no_mangling,
10151016
scope_hoisting,
1017+
debug_ids,
10161018
} = options;
10171019

10181020
let next_mode = mode.await?;
@@ -1045,7 +1047,8 @@ pub async fn get_server_chunking_context_with_client_assets(
10451047
})
10461048
.module_id_strategy(module_id_strategy.to_resolved().await?)
10471049
.export_usage(*export_usage.await?)
1048-
.file_tracing(next_mode.is_production());
1050+
.file_tracing(next_mode.is_production())
1051+
.debug_ids(*debug_ids.await?);
10491052

10501053
if next_mode.is_development() {
10511054
builder = builder.use_file_source_map_uris();
@@ -1089,6 +1092,7 @@ pub async fn get_server_chunking_context(
10891092
turbo_source_maps,
10901093
no_mangling,
10911094
scope_hoisting,
1095+
debug_ids,
10921096
} = options;
10931097
let next_mode = mode.await?;
10941098
// TODO(alexkirsz) This should return a trait that can be implemented by the
@@ -1118,7 +1122,8 @@ pub async fn get_server_chunking_context(
11181122
})
11191123
.module_id_strategy(module_id_strategy.to_resolved().await?)
11201124
.export_usage(*export_usage.await?)
1121-
.file_tracing(next_mode.is_production());
1125+
.file_tracing(next_mode.is_production())
1126+
.debug_ids(*debug_ids.await?);
11221127

11231128
if next_mode.is_development() {
11241129
builder = builder.use_file_source_map_uris()

0 commit comments

Comments
 (0)