Updating from Ionic 4 to 5
Migrating an app from Ionic 4 to 5 requires a few updates to the API properties, CSS utilities, and the installed package dependencies.
注記
This guide assumes that you have already updated your app to the latest version of Ionic 4. Make sure you have followed the Updating to Ionic 4 Guide before starting this guide.
Breaking Changes
For a complete list of breaking changes from Ionic 4 to Ionic 5, please refer to the breaking changes document in the Ionic Framework repository.
Packages and Dependencies
For Angular based projects, you can simply run:
npm install @ionic/angular@v5-lts @ionic/angular-toolkit@4.0.0 --save
For React projects, you can run:
npm install @ionic/react@v5-lts @ionic/react-router@v5-lts ionicons@5.5.3
For Stencil / vanilla JS projects, you can run:
npm i @ionic/core@v5-lts --save
If you would like a fresh project starter, a new project base can be created from the CLI and an existing app can be migrated over manually.