Skip to content

Commit

Permalink
fix order of resolve plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Mar 14, 2024
1 parent e4119b9 commit 8bea9a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/next-swc/crates/next-core/src/next_server/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,21 +171,21 @@ pub async fn get_server_resolve_options_context(
| ServerContextType::PagesApi { .. } => {
vec![
Vc::upcast(module_feature_report_resolve_plugin),
Vc::upcast(external_cjs_modules_plugin),
Vc::upcast(unsupported_modules_resolve_plugin),
Vc::upcast(next_external_plugin),
Vc::upcast(next_node_shared_runtime_plugin),
Vc::upcast(external_cjs_modules_plugin),
Vc::upcast(next_external_plugin),
]
}
ServerContextType::AppSSR { .. }
| ServerContextType::AppRSC { .. }
| ServerContextType::AppRoute { .. } => {
vec![
Vc::upcast(module_feature_report_resolve_plugin),
Vc::upcast(server_component_externals_plugin),
Vc::upcast(unsupported_modules_resolve_plugin),
Vc::upcast(next_external_plugin),
Vc::upcast(next_node_shared_runtime_plugin),
Vc::upcast(server_component_externals_plugin),
Vc::upcast(next_external_plugin),
]
}
ServerContextType::Middleware { .. } => {
Expand All @@ -199,8 +199,8 @@ pub async fn get_server_resolve_options_context(
vec![
Vc::upcast(module_feature_report_resolve_plugin),
Vc::upcast(unsupported_modules_resolve_plugin),
Vc::upcast(next_external_plugin),
Vc::upcast(next_node_shared_runtime_plugin),
Vc::upcast(next_external_plugin),
]
}
};
Expand Down

0 comments on commit 8bea9a6

Please sign in to comment.