我想使用 Live Reload add-on监视我的 persons.css
文件中的更改。但是当我修改我的 CSS 文件的代码时,我的 Firefox 没有任何变化。
我使用的地址是这样的:
http://localhost:8080/persons/person?id=1
它显示了一个加载我的简单 persons.css
文件的 HTML 页面。
这是我的配置:
我使用这个附加组件是因为它有很好的星级,但我可以使用另一个。这是我在 Yii2 项目中使用的第一个实时重新加载。
最佳答案
来自插件的开发人员,在插件的评论部分:
Local files cannot be monitored due to security restrictions in web extensions, enforced by Firefox.
In your case, I guess .tpl and .php files are used to render a page that's served on http://localhost? Can you use localhost URLs to set up a reload rule?
Note that in Live Reload, a Host can monitor itself. Example:
Host URL: http://localhost/some/path/*
Source file URLs http://localhost/some/path/*
不确定这是否仍然适用,因为如果主机 URL 和源 URL 匹配,插件似乎运行正常。
关于firefox - Live Reload (Blaise Kal) Firefox 附加组件不适用于 CSS 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62430282/