Skip to content

Commit 009f923

Browse files
committed
Document ESM changes in upgrade guide
1 parent 162aeeb commit 009f923

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

versioned_docs/version-7.x/upgrading-from-6.x.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ The `tabBarTestID` option in `@react-navigation/bottom-tabs` and `@react-navigat
338338

339339
See [Bottom Tab Navigator](bottom-tab-navigator.md#tabbarbuttontestid) and [Material Top Tab Navigator](material-top-tab-navigator.md#tabbarbuttontestid) docs for usage.
340340

341-
### The `sceneContainerStyle` prop and option are removed from Bottom Tab Navigator, Material Top Tab Navigator and Drawer Navigator in favor of `sceneStyle`
341+
#### The `sceneContainerStyle` prop and option are removed from Bottom Tab Navigator, Material Top Tab Navigator and Drawer Navigator in favor of `sceneStyle`
342342

343343
Previously, the Bottom Tab Navigator and Material Top Tab Navigator accepted a `sceneContainerStyle` prop to style the container of the scene. This was inflexible as it didn't allow different styles for different screens. Now, the `sceneStyle` option is added to these navigators to style individual screens.
344344

@@ -519,6 +519,14 @@ Custom navigators now require more type information to work correctly so that we
519519

520520
See [Custom navigators](custom-navigators.md) for usage.
521521

522+
#### Packages now use ESM and package exports
523+
524+
All the packages in React Navigation now use ESM exports. While it shouldn't affect most users, there are some changes to be aware of:
525+
526+
- 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.
527+
- 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.
528+
- If you're using Webpack, it maybe necessary to enable [`resolve.fullySpecified`](https://webpack.js.org/configuration/module/#resolvefullyspecified) for bundling to work.
529+
522530
## New features
523531

524532
### Static configuration API

0 commit comments

Comments
 (0)