Updating from Ionic 5 to 6
注記
This guide assumes that you have already updated your app to the latest version of Ionic 5. Make sure you have followed the Updating to Ionic 5 Guide before starting this guide.
Breaking Changes
For a complete list of breaking changes from Ionic 5 to Ionic 6, please refer to the breaking changes document in the Ionic Framework repository.
Getting Started
Angular
- Ionic 6 supports Angular 12+. Update to the latest version of Angular by following the Angular Update Guide.
- Update to the latest version of Ionic 6:
npm install @ionic/angular@6
If you are using Ionic Angular Server, be sure to update that as well:
npm install @ionic/angular@6 @ionic/angular-server@6
- Remove any usage of
Config.set()
. Instead, set your config inIonicModule.forRoot()
. See the Angular Config Documentation for more examples. - Remove any usage of the
setupConfig
function previously exported from@ionic/angular
. Set your config inIonicModule.forRoot()
instead.
React
- Ionic 6 supports React 17+. Update to the latest version of React:
npm install react@latest react-dom@latest
- Update to the latest version of Ionic 6:
npm install @ionic/react@6 @ionic/react-router@6