Ionic-cli 3.16.0 introduce the option --local
to ionic serve
to avoid the broadcasting to external network.
Anyone knows how could I set this option as default option? In package.json to ionic:serve
right?
I mostly work in co-working and public wifi spaces, therefore I gonna mostly not broadcast my app thru the network and would be happy not to have to type another option x times a day
Best bet is what you mentioned, place it into the package.json start script and when needed use ‘npm start‘
you are right that’s probably the solution, but at the end, I will not spare characters
For example if I write in package.json
"scripts": {
"ionic:serve": "ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser --local"
}
then I’ll have to run
npm run ionic:server
which actually isn’t that much less than
ionic serve --local
so well I guess I will just at the end go on with this last cmd and modify nothing