From 1fe5f9511d708ffb2c261f4e3a79dd15888546a5 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Sat, 26 Aug 2023 13:45:46 +0200 Subject: [PATCH] Reuse edgeConditionNames variable (#54594) Small change to reuse the same array defined right above. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- packages/next/src/build/webpack-config.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/next/src/build/webpack-config.ts b/packages/next/src/build/webpack-config.ts index 2ca96b4d71d94..e684b766fd995 100644 --- a/packages/next/src/build/webpack-config.ts +++ b/packages/next/src/build/webpack-config.ts @@ -115,12 +115,7 @@ const edgeConditionNames = [ const mainFieldsPerCompiler: Record = { [COMPILER_NAMES.server]: ['main', 'module'], [COMPILER_NAMES.client]: ['browser', 'module', 'main'], - [COMPILER_NAMES.edgeServer]: [ - 'edge-light', - 'worker', - // inherits the default conditions - '...', - ], + [COMPILER_NAMES.edgeServer]: edgeConditionNames, } const BABEL_CONFIG_FILES = [