as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容

2.1 Update babel.config.js

The Babel preset was renamed from metro-react-native-babel-preset to @react-native/babel-preset. In the babel.config.js file, rename the preset, such as the example below:
This example matches the Vega app template, which doesn’t include @amazon-devices/kepler-module-resolver-preset. If your babel.config.js listed that preset, removing it also removes its build-time aliasing, which rewrote imports of upstream packages to their @amazon-devices/* ports. Without it, those imports resolve to the upstream packages. Update each affected import to the @amazon-devices/* package, and remove the upstream package from package.json if nothing else uses it. For example:
For RN 0.83, the Vega ports of react-native-gesture-handler, react-native-reanimated, react-native-worklets, react-native-screens, react-native-svg, and @react-navigation/* don’t support the preset, so you must import them directly. Keeping the preset in babel.config.js has no effect on these packages. Only a few ports, such as react-native-device-info and @react-native-async-storage/async-storage, still support aliasing. For details, see Import Libraries in Your App with VMRP.

2.2 Update tsconfig.json

The base TypeScript config package changed from @tsconfig/react-native to @react-native/typescript-config. In the tsconfig.json file, rename the package, such as the example below:

2.3 Update .prettierrc.js

Remove bracketSameLine and bracketSpacing options from the prettierrc.js file.

2.4 Metro configuration

For the 0.72 to 0.83 upgrade, no metro.config.js changes are needed unless you have custom configurations. Metro updates automatically with React Native. The diffs you may see in upgrade guides (documentation URL changes, type annotation updates) are cosmetic only and have no functional impact. Only update Metro config if you need new features like:
  • unstable_enableSymlinks for monorepo support
  • unstable_allowRequireContext for dynamic requires
If your project doesn’t have a metro.config.js, don’t create one.
最后修改于 2026年10月28日