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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With