Issue
I used to build Ionic application and I'm used to ionic cap sync
when I make changes in my code. Recently, I used npx cap sync
instead and it is a lot faster but sometimes it feels like it just ignore all the changes I've made. When should I use one or the other?
Solution
ionic cap sync
first builds (ie ionic build
) before doing the same as npx cap sync
ionic capacitor sync will do the following:
- Perform an Ionic build, which compiles web assets
- Copy web assets to Capacitor native platform(s)
- Update Capacitor native platform(s) and dependencies
- Install any discovered Capacitor or Cordova plugins
Source: https://ionicframework.com/docs/cli/commands/capacitor-sync
Capacitor CLI - cap sync
This command runs copy and then update.
Source: https://capacitorjs.com/docs/cli/sync
Answered By - maxfloden
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.