Disable livereload on ionic 4/5

Please, how to disable livereload in the ionic 4 application. To not reload the browser each time the project is saved.
I try
ionic serve --no-livereload
ionic serve -livereload false
ionic serve --no-live-reload

My ionic info


   Ionic CLI                     : 6.9.2
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.6
   @angular-devkit/schematics    : 9.1.6
   @angular/cli                  : 9.1.6
   @ionic/angular-toolkit        : 2.2.0


   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 6 other plugins)


   cordova-res : 0.14.0
   native-run  : 1.0.0


   Android SDK Tools : 26.1.1
   NodeJS            : v10.16.3
   npm               : 6.9.0
   OS                : Linux 4.15

Use ng serve instead of ionic serve to have access to more options

ng serve --liveReload=false

If you want to keep ionic serve default options

ng serve --liveReload=false --port=8100 --open=true

You can also write a shortcut to make it easier, write the command no-reload (name it whatever) in the scripts section in package.json

"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "no-reload": "ng serve --port=8100 --liveReload=false --open=true"

then run npm run no-reload

1 Like

Thank you ! And thanks also for the scripts tips in package.json!