diff --git a/packages/jest-resolve/src/defaultResolver.ts b/packages/jest-resolve/src/defaultResolver.ts index 46f538419848..52df2242646b 100644 --- a/packages/jest-resolve/src/defaultResolver.ts +++ b/packages/jest-resolve/src/defaultResolver.ts @@ -120,7 +120,7 @@ function createPackageFilter( return { ...filteredPkg, - main: filteredPkg.main ?? attemptExportsFallback(filteredPkg), + main: attemptExportsFallback(filteredPkg), }; }; }