I'm successfully able to convert the angular app into an ionic4 application using Ionic and Capacitor. However, when I make changes to the src folder, it doesn't update in the iOS app when I run it.
I'm doing the following:
npx cap add ios (only first time)
ionic build --prod
npx cap copy
npx cap open ios
More so, I'm noticing the /www
folder not being updated with my changes. Instead, there is a /dist
folder being updated... strange. This makes sense, because npx cap copy
copies the /www
folder into the ios/App/public
folder.
How do I get my changes in /src
into my ionic ios build?
Here is what I do when I make a change to my codebase and want to see the change in my Capacitor app:
I have a command in my package.json which allows me to run 'npm run build-cap' instead of running each of these commands one at time.
"build-cap": "eliminate ios && ionic build && npx cap add ios && npx cap update ios && npx cap open ios",
For me it was necessary to wipe out the ios folder and rebuild the www directory by running 'ionic build' to see my changes.