ionic-frameworkionic2windows-8.1livereload

ionic run browser --livereload not working


i was trying to use live reload on my ionic 2 application. so i found this command

ionic run browser --live-reload

is not working as expected and while making code changes i am receiving console messages

[16:12:47]  build started ...
[16:12:47]  transpile update started ...
[16:12:47]  transpile update finished in 46 ms
[16:12:47]  deeplinks update started ...
[16:12:47]  deeplinks update finished in 248 ms
[16:12:47]  webpack update started ...

but the page isn't reloading


Solution

  • i found the solution on the github page

    include a script in the package.json file

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

    and run

    npm run browser