Skip to content

Commit

Permalink
use shared function
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed May 23, 2023
1 parent 891b9b5 commit 021b207
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/next-swc/crates/next-core/src/app_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ async fn create_app_route_source_for_route(
project_path,
intermediate_output_path: intermediate_output_path_root,
output_root: intermediate_output_path_root,
app_dir,
}
.cell()
.into(),
Expand Down Expand Up @@ -1018,7 +1019,7 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}";
project_path,
intermediate_output_path,
intermediate_output_path.join("chunks"),
server_root.join("_next/static/media"),
get_client_assets_path(server_root, Value::new(ClientContextType::App { app_dir })),
context.compile_time_info().environment(),
)
.layer("ssr")
Expand Down Expand Up @@ -1087,6 +1088,7 @@ struct AppRoute {
project_path: FileSystemPathVc,
server_root: FileSystemPathVc,
output_root: FileSystemPathVc,
app_dir: FileSystemPathVc,
}

#[turbo_tasks::value_impl]
Expand All @@ -1099,7 +1101,12 @@ impl AppRouteVc {
this.project_path,
this.intermediate_output_path,
this.intermediate_output_path.join("chunks"),
this.server_root.join("_next/static/media"),
get_client_assets_path(
this.server_root,
Value::new(ClientContextType::App {
app_dir: this.app_dir,
}),
),
this.context.compile_time_info().environment(),
)
.layer("ssr")
Expand Down

0 comments on commit 021b207

Please sign in to comment.