@@ -389,11 +389,6 @@ async fn insert_next_server_special_aliases(
389389 NextRuntime :: Edge => request_to_import_mapping ( context_dir, request) ,
390390 NextRuntime :: NodeJs => external_request_to_import_mapping ( request) ,
391391 } ;
392- let passthrough_external_if_node =
393- move |context_dir : Vc < FileSystemPath > , request : & str | match runtime {
394- NextRuntime :: Edge => request_to_import_mapping ( context_dir, request) ,
395- NextRuntime :: NodeJs => ImportMapping :: External ( None ) . cell ( ) ,
396- } ;
397392 match ( mode, ty) {
398393 ( _, ServerContextType :: Pages { pages_dir } ) => {
399394 import_map. insert_exact_alias (
@@ -441,11 +436,11 @@ async fn insert_next_server_special_aliases(
441436 ) ;
442437 import_map. insert_exact_alias (
443438 "styled-jsx" ,
444- passthrough_external_if_node ( app_dir, "next/dist/compiled/ styled-jsx" ) ,
439+ request_to_import_mapping ( get_next_package ( app_dir) , "styled-jsx" ) ,
445440 ) ;
446441 import_map. insert_wildcard_alias (
447442 "styled-jsx/" ,
448- passthrough_external_if_node ( app_dir, "next/dist/compiled/ styled-jsx/*" ) ,
443+ request_to_import_mapping ( get_next_package ( app_dir) , "styled-jsx/*" ) ,
449444 ) ;
450445 import_map. insert_exact_alias (
451446 "react/jsx-runtime" ,
@@ -561,6 +556,14 @@ async fn insert_next_server_special_aliases(
561556 // @opentelemetry/api
562557 request_to_import_mapping ( app_dir, "next/dist/compiled/@opentelemetry/api" ) ,
563558 ) ;
559+ import_map. insert_exact_alias (
560+ "styled-jsx" ,
561+ request_to_import_mapping ( get_next_package ( app_dir) , "styled-jsx" ) ,
562+ ) ;
563+ import_map. insert_wildcard_alias (
564+ "styled-jsx/" ,
565+ request_to_import_mapping ( get_next_package ( app_dir) , "styled-jsx/*" ) ,
566+ ) ;
564567
565568 import_map. insert_exact_alias (
566569 "react/jsx-runtime" ,
0 commit comments