Livereload not working with browser platform

My ionic application uses the camera, so I’m using I need cordova support. I’m running the following command to develop:

ionic cordova run browser --livereload

Everything starts fine. And, when I save a changed source file, I do see that ionic is rebuilding. But, in the browser, the source and javascript files do not update. Any suggestions on what I could try next?
I did find a possibly related issue in github. Please let me know if there’s anything I can try, or any more info I can provide. Thank you!

My ionic info:

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : browser 4.1.0
    Ionic Framework                 : ionic-angular 3.4.2

System:

    Node       : v7.10.0
    OS         : macOS Sierra
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 4.2.0
2 Likes

Have the exact same problem and this tarted happening after I installed the latest version

2 Likes

The latest version of Ionic CLI? I’m having the same problem.

👉  ionic info

cli packages: (/Users/me/projects/APP/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.0
    Cordova Platforms  : android 6.4.0 browser 5.0.1 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node  : v8.9.4
    npm   : 5.6.0
    OS    : macOS High Sierra
    Xcode : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

I found something this stackoverflow issue, works okay.

suggest creating an npm script (package.json)

"browser": "ionic cordova run browser",
"browser-live": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build"

Run in the terminal

npm run browser
npm run browser-live