Assetic 不会在没有缓存的情况下更新样式:清除 [英] Assetic doesn't update styles without cache:clear
问题描述
我有一个 app.less 可以导入所有内容(更少),如果我在 app.less 应用程序样式中注释一行,则不会呈现注释部分,但是如果我更改导入的更少文件中的某些内容,任何内容都会更改,我必须做 cache:clear
并清除浏览器缓存以查看加载的新样式...
I have an app.less that imports everything (less) else if I comment a line in app.less app styles doesn't render the commented part, but if I change something in that imported less file, anything changes, I have to do cache:clear
and to clear the browser cache to see the new style loaded...
推荐答案
从另一个样式表(less、sass 等)导入的资产在更改时不会重新编译,即使您使用 php app/console资产:转储 --watch
.请参阅另一个问题StackOverflow 和 这个问题在 AsseticBundle
问题队列中一>.
Assets that are imported from another stylesheet (less, sass, whatever) will not be recompiled when they change, even if you use php app/console assets:dump --watch
. See another question on StackOverflow and this issue in the AsseticBundle
issue queue.
这篇关于Assetic 不会在没有缓存的情况下更新样式:清除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!