From 1ef8d7a1b232512b051d0b48223142bde7dd6703 Mon Sep 17 00:00:00 2001 From: Jeremiah Snee <113928685+jeremiah-snee-openx@users.noreply.github.com> Date: Thu, 22 Jun 2023 13:30:44 -0500 Subject: [PATCH] fix(webpack): update withNx mainFields ordering to support tree-shaking (#17599) --- packages/webpack/src/utils/with-nx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webpack/src/utils/with-nx.ts b/packages/webpack/src/utils/with-nx.ts index 5c99d803ee5848..a05023af6a562c 100644 --- a/packages/webpack/src/utils/with-nx.ts +++ b/packages/webpack/src/utils/with-nx.ts @@ -45,7 +45,7 @@ const IGNORED_WEBPACK_WARNINGS = [ ]; const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx']; -const mainFields = ['main', 'module']; +const mainFields = ['module', 'main']; const processed = new Set();