From d5de3a409be85ab95dd117331ae457b72057f026 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 1 Feb 2023 08:06:32 +0100 Subject: [PATCH] add worker condition to edge compilation (vercel/turbo#3549) some packages expect `worker` or `browser` condition to work on edge runtime --- packages/next-swc/crates/next-core/src/next_edge/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-swc/crates/next-core/src/next_edge/context.rs b/packages/next-swc/crates/next-core/src/next_edge/context.rs index 468c0357a5cce..9ffb084dca0cc 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/context.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/context.rs @@ -31,7 +31,7 @@ pub async fn get_edge_resolve_options_context( let resolve_options_context = ResolveOptionsContext { enable_node_modules: true, - custom_conditions: vec!["development".to_string()], + custom_conditions: vec!["worker".to_string(), "development".to_string()], import_map: Some(next_edge_import_map), module: true, ..Default::default()