From 84334ca56f8ab65f8744d684476dd9afdba01c6d Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Mon, 25 Nov 2024 22:32:05 +0100 Subject: [PATCH] Add note about TypeScript regarding ESM --- versioned_docs/version-7.x/upgrading-from-6.x.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/versioned_docs/version-7.x/upgrading-from-6.x.md b/versioned_docs/version-7.x/upgrading-from-6.x.md index 87baab2528..455f4b9d95 100755 --- a/versioned_docs/version-7.x/upgrading-from-6.x.md +++ b/versioned_docs/version-7.x/upgrading-from-6.x.md @@ -559,7 +559,8 @@ All the packages in React Navigation now use ESM exports. While it shouldn't aff - If you are importing internal files from the packages, they might now be restricted by your bundler and it won't be possible to import them directly. You should use the public API instead. - If you're patching the packages using `patch-package`, `yarn patch` etc., you'll need to patch the built files under `lib/` folders instead of the source files under `src/` as the source files are no longer exported. -- If you're using Webpack, it maybe necessary to set [`resolve.fullySpecified`](https://webpack.js.org/configuration/module/#resolvefullyspecified) to `false` for bundling to work. +- If you're using TypeScript with the `module` or `moduleResolution` option, it maybe necessary to set `moduleResolution` to `Bundler` to match [Metro's resolution behavior](https://reactnative.dev/blog/2023/06/21/package-exports-support#enabling-package-exports-beta). +- If you're using Webpack for bundling code using React Navigation, it maybe necessary to set [`resolve.fullySpecified`](https://webpack.js.org/configuration/module/#resolvefullyspecified) to `false` for bundling to work. ## New features