File tree 4 files changed +13
-1
lines changed
next-core/src/next_manifests
4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -637,6 +637,10 @@ impl AppEndpoint {
637
637
client_references_chunks,
638
638
this. app_project . project ( ) . client_chunking_context ( ) ,
639
639
Vc :: upcast ( this. app_project . project ( ) . ssr_chunking_context ( ) ) ,
640
+ this. app_project
641
+ . project ( )
642
+ . next_config ( )
643
+ . computed_asset_prefix ( ) ,
640
644
) ;
641
645
server_assets. push ( entry_manifest) ;
642
646
}
Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ pub async fn get_app_entries(
239
239
/// to `all_chunks`, and the chunking information will be added to the provided
240
240
/// manifests.
241
241
pub async fn compute_app_entries_chunks (
242
+ next_config : Vc < NextConfig > ,
242
243
app_entries : & AppEntries ,
243
244
app_client_reference_graph : Vc < ClientReferenceGraph > ,
244
245
app_client_references_chunks : Vc < ClientReferencesChunks > ,
@@ -340,6 +341,7 @@ pub async fn compute_app_entries_chunks(
340
341
app_client_references_chunks,
341
342
client_chunking_context,
342
343
ssr_chunking_context,
344
+ next_config. computed_asset_prefix ( ) ,
343
345
) ;
344
346
345
347
all_chunks. push ( entry_manifest) ;
Original file line number Diff line number Diff line change @@ -331,6 +331,7 @@ pub(crate) async fn next_build(options: TransientInstance<BuildOptions>) -> Resu
331
331
// TODO(alexkirsz) Do some of that in parallel with the above.
332
332
333
333
compute_app_entries_chunks (
334
+ next_config,
334
335
& app_entries,
335
336
app_client_references,
336
337
app_client_references_chunks,
Original file line number Diff line number Diff line change @@ -30,9 +30,14 @@ impl ClientReferenceManifest {
30
30
client_references_chunks : Vc < ClientReferencesChunks > ,
31
31
client_chunking_context : Vc < Box < dyn EcmascriptChunkingContext > > ,
32
32
ssr_chunking_context : Vc < Box < dyn EcmascriptChunkingContext > > ,
33
+ asset_prefix : Vc < Option < String > > ,
33
34
) -> Result < Vc < Box < dyn OutputAsset > > > {
34
35
let mut entry_manifest: ClientReferenceManifest = Default :: default ( ) ;
35
- entry_manifest. module_loading . prefix = "/_next/" . to_string ( ) ;
36
+ entry_manifest. module_loading . prefix = asset_prefix
37
+ . await ?
38
+ . as_ref ( )
39
+ . map ( |p| p. to_owned ( ) )
40
+ . unwrap_or_default ( ) ;
36
41
entry_manifest. module_loading . cross_origin = None ;
37
42
let client_references_chunks = client_references_chunks. await ?;
38
43
let client_relative_path = client_relative_path. await ?;
You can’t perform that action at this time.
0 commit comments