Skip to content

Commit

Permalink
Review comments: support custom distDir
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 19, 2024
1 parent dec5977 commit 981f5ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/next-api/src/nft_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ impl NftJsonAsset {
fn project_path(&self) -> Vc<FileSystemPath> {
self.project.project_path().root()
}

#[turbo_tasks::function]
fn dist_dir(&self) -> Vc<RcStr> {
self.project.dist_dir()
}
}

#[turbo_tasks::value(transparent)]
Expand Down Expand Up @@ -128,7 +133,7 @@ impl NftJsonAsset {
.await?
.get_relative_path_to(&path_ref)
.unwrap()
.replace("/_next/", "/.next/")
.replace("/_next/", &self.dist_dir().await?)
.into(),
)));
}
Expand Down

0 comments on commit 981f5ea

Please sign in to comment.