2

We need to update a legacy Ionic 3 project into Ionic 6. Ionicframework has a migration guide from 3 to 4, 4 to 5 and 5 to 6. But the most challenging is migrate 3 to 4.

Migration from 3 to 4 ionic start myApp tab

It creates a blank project in Ionic 6.

So first step: how to create a Ionic 4 project using Ionic CLI instead of 6?

Step 2: What files to change to Ionic 4?

Step 3: How to run a blank Ionic 5 using Ionic Cli?

Step 4: What files to change to update from 4 to 5?

Step 5: What files to change to update from 5 to 6?

Ikhan
  • 41
  • 1
  • 3
  • in this case you need to start new project in ionic-6 with capacitor, because after ionic-3 in ionic 4 project structure changed – Ravi Ashara Apr 15 '22 at 08:59
  • Right. The challenge is Ionic recommended to migrate from 3 to 4 then 4 to 5 and subsequently 5 to 6. So if a new Ionic 6 project is created then how to implement the breaking changes for previous update i.e 3 to 4, 4 to 5 and test on Ionic 6 project. – Ikhan Apr 16 '22 at 09:14

1 Answers1

3

Suggestion: To avoid a lot of errors and adaptations and many hours developing, I think you should go directly to the Ionic 6. Start a new App and transfer the logics and page flows to the new App. Instead It can be a headache, If you go from version 3 to 6. There are also many changes on the libraries and plugins installed on the old App compared to a new one.

Update: You can check the Ionic Breaking Changes.

Everton Costa
  • 570
  • 5
  • 16
  • Right. I’m also thinking so. Created a new Ionic 6 project and trying to migrate code logic. But there are many underlying breaking changes especially introduction of capacitor, Angular Router, Webview and others. Did not find any resources and someone didi it previously. – Ikhan Apr 12 '22 at 07:57
  • Great, so could you please upvote the answer? And what are you looking for, right now saying "Did not find any resources and someone didi it previously"? – Everton Costa Apr 12 '22 at 17:55
  • Upvote recorded. I’m looking for any resouce where someone updated from Ionic 3 to Ionic 5/6. – Ikhan Apr 13 '22 at 22:37
  • 1
    Good, but I have to tell you that it seems me a lot of work to do. So, I added an update about the Breaking Changes that you will have on the code conversion. Good luck bro! – Everton Costa Apr 14 '22 at 01:10