CSS更改仅在magento2中的deploy命令之后反映 [英] Css changes reflect only after deploy command in magento2
问题描述
现在我已经在magento2中创建了自定义主题.每次我写CSS时,它都不会立即反映出来.我已将模式更改为开发人员".并且还禁用了缓存 在后端.我给出了以下命令来反映我的自定义CSS.
Now i have created custom theme in magento2.Every time i wrote css it doesn't reflect immediately.I have changed mode to "developer".And also disable cache in backend.I have given the following commands to reflect my custom css.
rm -f var/* -R
rm -f pub/static -R
php bin/magento设置:静态内容:部署
chmod 0777 var -R
chmod 0777 pub/static -R
我的设计工作花了太多时间,所以请任何人帮助.
It takes too much time to do my design work.So please anyone help on this.
推荐答案
Emizen Tech 建议的解决方案很好,可以帮助我解决网站中的相同问题.
The solution suggested by Emizen Tech works fine and helps me out to resolve the same issue in my site.
但是,只需要将mode
设置为开发人员即可.
However, it only requires mode
to be set to the developer.
要更改mode
,请使用以下命令:
In order to change the mode
, here is the command:
bin/magento deploy:mode:set developer
这篇关于CSS更改仅在magento2中的deploy命令之后反映的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!