Capacitor Live Reload with stencil ask for npm script

I’m trying to run Live reload in a project with stencil:

ionic capacitor run ios -l --external -p=4400

But I get the error

Since you’re using the custom project type, you must provide the ionic:serve npm script so the Ionic CLI can serve your project.

I found scripts for vue and for react, but nothing for stencil.


Ok, I think I found the solution.

I added this line to the script section in package.json:

"ionic:serve": "stencil build --dev --watch --serve"