Unverified Commit 98ffe450 authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(next-core): refine context for unsupported edge imports (#63622)

### What

Followup for the unsupported imports in edge to inject corresponding
context only.

Closes PACK-2824
parent 65d699e7
...@@ -469,7 +469,24 @@ pub async fn get_next_edge_import_map( ...@@ -469,7 +469,24 @@ pub async fn get_next_edge_import_map(
) )
.await?; .await?;
insert_unsupported_node_internal_aliases(&mut import_map, project_path, execution_context); // Look for where 'server/web/globals.ts` are imported to find out corresponding
// context
match ty {
ServerContextType::AppSSR { .. }
| ServerContextType::AppRSC { .. }
| ServerContextType::AppRoute { .. }
| ServerContextType::Middleware { .. }
| ServerContextType::Pages { .. }
| ServerContextType::PagesData { .. }
| ServerContextType::PagesApi { .. } => {
insert_unsupported_node_internal_aliases(
&mut import_map,
project_path,
execution_context,
);
}
_ => {}
}
Ok(import_map.cell()) Ok(import_map.cell())
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment