@@ -283,6 +283,10 @@ impl AppProject {
283283 ) ) ) ,
284284 ) ,
285285 ( "next-ssr" . to_string ( ) , Vc :: upcast ( self . ssr_transition ( ) ) ) ,
286+ (
287+ "next-shared" . to_string ( ) ,
288+ Vc :: upcast ( self . shared_transition ( ) ) ,
289+ ) ,
286290 ]
287291 . into_iter ( )
288292 . collect ( ) ;
@@ -315,6 +319,10 @@ impl AppProject {
315319 "next-ssr" . to_string ( ) ,
316320 Vc :: upcast ( self . edge_ssr_transition ( ) ) ,
317321 ) ,
322+ (
323+ "next-shared" . to_string ( ) ,
324+ Vc :: upcast ( self . edge_shared_transition ( ) ) ,
325+ ) ,
318326 ]
319327 . into_iter ( )
320328 . collect ( ) ;
@@ -344,6 +352,10 @@ impl AppProject {
344352 ) ) ) ,
345353 ) ,
346354 ( "next-ssr" . to_string ( ) , Vc :: upcast ( self . ssr_transition ( ) ) ) ,
355+ (
356+ "next-shared" . to_string ( ) ,
357+ Vc :: upcast ( self . shared_transition ( ) ) ,
358+ ) ,
347359 ]
348360 . into_iter ( )
349361 . collect ( ) ;
@@ -359,8 +371,30 @@ impl AppProject {
359371
360372 #[ turbo_tasks:: function]
361373 fn edge_route_module_context ( self : Vc < Self > ) -> Vc < ModuleAssetContext > {
374+ let transitions = [
375+ (
376+ ECMASCRIPT_CLIENT_TRANSITION_NAME . to_string ( ) ,
377+ Vc :: upcast ( NextEcmascriptClientReferenceTransition :: new (
378+ Vc :: upcast ( self . client_transition ( ) ) ,
379+ self . edge_ssr_transition ( ) ,
380+ ) ) ,
381+ ) ,
382+ (
383+ "next-dynamic" . to_string ( ) ,
384+ Vc :: upcast ( NextDynamicTransition :: new ( Vc :: upcast (
385+ self . client_transition ( ) ,
386+ ) ) ) ,
387+ ) ,
388+ ( "next-ssr" . to_string ( ) , Vc :: upcast ( self . ssr_transition ( ) ) ) ,
389+ (
390+ "next-shared" . to_string ( ) ,
391+ Vc :: upcast ( self . edge_shared_transition ( ) ) ,
392+ ) ,
393+ ]
394+ . into_iter ( )
395+ . collect ( ) ;
362396 ModuleAssetContext :: new (
363- Default :: default ( ) ,
397+ Vc :: cell ( transitions ) ,
364398 self . project ( ) . edge_compile_time_info ( ) ,
365399 self . edge_route_module_options_context ( ) ,
366400 self . edge_route_resolve_options_context ( ) ,
@@ -435,6 +469,16 @@ impl AppProject {
435469 )
436470 }
437471
472+ #[ turbo_tasks:: function]
473+ fn shared_transition ( self : Vc < Self > ) -> Vc < ContextTransition > {
474+ ContextTransition :: new (
475+ self . project ( ) . server_compile_time_info ( ) ,
476+ self . ssr_module_options_context ( ) ,
477+ self . ssr_resolve_options_context ( ) ,
478+ Vc :: cell ( "app-shared" . to_string ( ) ) ,
479+ )
480+ }
481+
438482 #[ turbo_tasks:: function]
439483 fn edge_ssr_transition ( self : Vc < Self > ) -> Vc < ContextTransition > {
440484 ContextTransition :: new (
@@ -445,6 +489,16 @@ impl AppProject {
445489 )
446490 }
447491
492+ #[ turbo_tasks:: function]
493+ fn edge_shared_transition ( self : Vc < Self > ) -> Vc < ContextTransition > {
494+ ContextTransition :: new (
495+ self . project ( ) . edge_compile_time_info ( ) ,
496+ self . edge_ssr_module_options_context ( ) ,
497+ self . edge_ssr_resolve_options_context ( ) ,
498+ Vc :: cell ( "app-edge-shared" . to_string ( ) ) ,
499+ )
500+ }
501+
448502 #[ turbo_tasks:: function]
449503 async fn runtime_entries ( self : Vc < Self > ) -> Result < Vc < RuntimeEntries > > {
450504 Ok ( get_server_runtime_entries (
0 commit comments