Skip to content

Commit 2356190

Browse files
committed
Turbopack: skip next-server.js.nft.json for Vercel
1 parent 4453d20 commit 2356190

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![minimal]))
51+
} else {
52+
Ok(Vc::cell(vec![
53+
minimal,
54+
ResolvedVc::upcast(
55+
ServerNftJsonAsset::new(project, ServerNftType::Full)
56+
.to_resolved()
57+
.await?,
58+
),
59+
]))
60+
}
5361
}
5462

5563
#[turbo_tasks::value]

0 commit comments

Comments
 (0)