Con*_*ech 0 google-chrome sass css3
我的本地计算机上有一个普通的文件网站,并希望使用Sass。在<head>索引页面的中,我有:
<link rel="stylesheet" type="text/css" href="stylesheets/style.scss" />
Run Code Online (Sandbox Code Playgroud)
虽然当我在Chrome中运行此命令时,控制台出现错误:
Resource interpreted as Stylesheet but transferred with MIME type text/plain 来自索引中的链接标记。
如何更改模因类型,以便Chrome呈现我的Sass样式?
text/x-sass和text/x-scss,根据https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
要知道,这将不会使Web浏览器将其编译为CSS,因为它们不包含SASS解析器/编译器。唯一的用例是打算通过配置的HTML解析器进行转换的模板。