实时重新加载不适用于实时服务器@ 0.9.2

live reload not working for live-server@ 0.9.2

对于我的 Web 应用程序,我正在使用 "live-server":“^0.9.2”,这是包 json 文件,

{
  "name": "demoapp",
  "version": "1.0.0",
  "description": "This project contains the samples of the book",
  "scripts": {
    "live": "live-server",
    "start": "npm run live"
  },
  "dependencies": {
    "angular": "^1.5.0",
    "angular-messages": "^1.5.0",
    "angular-route": "^1.5.0",
    "bootstrap": "^3.3.6",
    "jquery": "^2.2.0"
  },
  "devDependencies": {
    "live-server": "^0.9.2"
  }
}

当我执行命令 "npm start" 时,实时服务器启动并且网页启动 @ http://127.0.0.1:8080/

现在,每当我更改 html/css 的内容时,都不会进行更改检测,浏览器内容也不会刷新。

可能是什么原因?如何解决它。谢谢!!!

根据 github readme 文档,如果扩展可以找到默认在 Web 浏览器上提供的 html 文件,则扩展效果最佳。它可能会检测到您编辑的本地文件中的更改,但将它们呈现给浏览器取决于您是否正在编辑 html 文件。必须有一个 hack 才能工作,只是还没有找到