ionic run browser --livereload not working

manish kumar picture manish kumar · May 25, 2017 · Viewed 13.6k times · Source

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

Answer

manish kumar picture manish kumar · Jul 29, 2017

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