离子运行浏览器--livereload不工作 [英] ionic run browser --livereload not working

查看:254
本文介绍了离子运行浏览器--livereload不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的离子2应用程序上使用实时重新加载。所以我找到了这个命令

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 ...

但页面没有重新加载

推荐答案

我在github页面找到了解决方案

i found the solution in the github page


在包中包含一个脚本。 json文件

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"

并运行

npm run browser

这篇关于离子运行浏览器--livereload不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆