Zys*_*sce 4 css sass web-compiler
Web编译器与VS2015 Update 1和Sass有问题.
在我的Scss文件中,我将一些图像声明为背景.
示例:
.example {
background-image: url(images/ex.jpg);
}
Run Code Online (Sandbox Code Playgroud)
在文件compilerconfig.json中,outPutFile不在同一目录中.在文件compilerconfig.json.defaults中,我在sass部分中将relativeUrls设置为false.当我编译时,url变得相对像:
.example {
background-image: url(../../../../../images/ex.jpg);
}
Run Code Online (Sandbox Code Playgroud)
我对导入的文件有同样的问题.
有什么方法可以解决这个问题吗?
我找到了如何禁用相对URL:该选项不是在compileconfig.json.defaults文件中设置,而是在compilerconfig.json中:
[
{
"outputFile": "../../../../../inetpub/wwwroot/ui/skins/test.css",
"inputFile": "Web/Stylesheets/test.scss",
"minify": {
"termSemicolons": true
},
"options": {
"relativeUrls": false,
"lineFeed": "crlf"
}
}
]
Run Code Online (Sandbox Code Playgroud)