Chrome的“自动重新加载生成的CSS”当SASS重新编译CSS时不重新加载页面 [英] Chrome's "Auto-Reload Generated CSS" not reloading page when SASS recompiles CSS

查看:1010
本文介绍了Chrome的“自动重新加载生成的CSS”当SASS重新编译CSS时不重新加载页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Chrome的DevTools在保存观看的SCSS文件时自动重新加载页面,该文件将编译并更改CSS文件。

I'm trying to get Chrome's DevTools to auto reload a page when I save a watched SCSS file which will compile and make changes to the CSS file.

我有自动重新生成的CSS选项检查,但可惜的是,它不能按预期工作。

I have the Auto-reload generated CSS option checked, but sadly, it isn't working as expected.

我对SCSS文件进行更改并保存,该页面不重新加载。我已将我的工作文件夹添加到工作区,并将文件(SCSS文件和生成的CSS)映射到本地系统驱动器上的相应版本。

Whenever I make changes to the SCSS file and save it, the page doesn't reload. I have added my working folder to the workspace and also mapped the files (both the SCSS file and the generated CSS) to their respective versions on my local system drive. This, however, doesn't help.

由于scss文件反映在DevTools检查器中,SASS源映射似乎工作正常:

The SASS source maps seems to be working fine as the scss files are reflected in the DevTools inspector:

>

我使用Chrome 31版本:

I'm using Chrome version 31:

我错过了我不知道的东西吗?

Have I missed out anything that I don't know of? What else do I have to do to get this to work?

推荐答案

我在这种情况下使用drupal,并且drupal生成css链接'style.css?abc'。此后缀?abc中的问题。您需要从LOCAL(按右键单击本地)'style.css'到WEB'style.css?abc'(如列表所示)开始文件映射。不是从WEB到LOCAL。如果结果正确,WEB-links从resourses选项卡的列表中消失。

I used drupal in this case and drupal generate css link like 'style.css?abc'. Problem in this suffix '?abc'. You need to start file mapping from LOCAL (press right-click on local) 'style.css' to WEB 'style.css?abc' (shown in list). Not from WEB to LOCAL. If result is correct WEB-links disappears from list in 'resourses' tab.

这篇关于Chrome的“自动重新加载生成的CSS”当SASS重新编译CSS时不重新加载页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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