From ba45395428d8bdc4c097b41268ec062cd03cf77d Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 13 Aug 2024 12:53:30 +0200 Subject: [PATCH] Turbopack dev/build: Ensure serverExternalPackages applies to instrumentation.ts (#68835) ## What? After the fix in #68788 there was a report that the change doesn't resolve the problem, turns out that's because it was importing the package in `instrumentation.ts`. I found that `serverExternalPackages` didn't apply to `instrumentation.ts` in Turbopack, this PR fixes that. Fixes https://github.com/vercel/next.js/issues/68101#issuecomment-2285814582 --- crates/next-core/src/next_server/context.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/next-core/src/next_server/context.rs b/crates/next-core/src/next_server/context.rs index e7eeb7852a8a7..73d78bdd22444 100644 --- a/crates/next-core/src/next_server/context.rs +++ b/crates/next-core/src/next_server/context.rs @@ -254,6 +254,7 @@ pub async fn get_server_resolve_options_context( ServerContextType::Instrumentation { .. } => { vec![ Vc::upcast(next_node_shared_runtime_plugin), + Vc::upcast(server_external_packages_plugin), Vc::upcast(next_external_plugin), ] }