Skip to content

Commit 83fe855

Browse files
committed
Turbopack: skip next-server.js.nft.json for Vercel
1 parent 600e10c commit 83fe855

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

crates/next-api/src/next_server_nft.rs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,26 @@ enum ServerNftType {
3838

3939
#[turbo_tasks::function]
4040
pub async fn next_server_nft_assets(project: Vc<Project>) -> Result<Vc<OutputAssets>> {
41-
Ok(Vc::cell(vec![
42-
ResolvedVc::upcast(
43-
ServerNftJsonAsset::new(project, ServerNftType::Full)
44-
.to_resolved()
45-
.await?,
46-
),
47-
ResolvedVc::upcast(
48-
ServerNftJsonAsset::new(project, ServerNftType::Minimal)
49-
.to_resolved()
50-
.await?,
51-
),
52-
]))
41+
let has_next_support = *project.next_config().ci_has_next_support().await?;
42+
43+
let minimal = ResolvedVc::upcast(
44+
ServerNftJsonAsset::new(project, ServerNftType::Minimal)
45+
.to_resolved()
46+
.await?,
47+
);
48+
49+
if has_next_support {
50+
Ok(Vc::cell(vec![
51+
minimal,
52+
ResolvedVc::upcast(
53+
ServerNftJsonAsset::new(project, ServerNftType::Full)
54+
.to_resolved()
55+
.await?,
56+
),
57+
]))
58+
} else {
59+
Ok(Vc::cell(vec![minimal]))
60+
}
5361
}
5462

5563
#[turbo_tasks::value]

0 commit comments

Comments
 (0)