用于导入绝对路径的Sass intellisense [英] Sass intellisense for importing absolute paths
问题描述
我在导入变量的智能感知在VS 2015中的sass文件中工作时遇到了一些问题。
我在/ Static / Styles /中有一些全局sass文件,我是从/ Components /中的各种文件导入以访问全局变量。
我正在使用WebCompiler扩展并通过将compilerconfig中的值includePath设置为"Static / Styles"来完成编译工作/"但是intellisense不会在这些文件中获取变量。
我尝试使用"<引用文件。参考路径... />"但也没有运气。唯一有效的方法是使用相对路径导入文件,但这当然远非理想。
@ import" /Styles/Static/_settings.global .scss英寸; //不起作用
@import" _settings.global.scss" ;; //编译但没有intellisense
@import" ../../../../ Static / Styles / _settings.global.scss" ;; //编译和智能感知工作
有没有办法让intellisense在sass中使用绝对路径?
朋友,
>> 有没有办法让IntelliSense与sass中的绝对路径一起使用?
似乎没有。
但是有一些解决方法,
sass-loader 解决此问题。
希望它有用。
祝你好运,
Fletch
I'm having some issues with getting the intellisense for imported variables to work in sass-files in VS 2015.
I have some global sass-files in /Static/Styles/ that I'm importing from various files in /Components/ to access the global variables.
I'm using the WebCompiler extension and got the compilation working by setting the value includePath in compilerconfig to "Static/Styles/" but the intellisense won't pick up the variables in these files.
I have tried referencing the files with "< reference path.../>" but no luck there either. The only thing that works is importing the files with a relative path but this is of course far from ideal.
@import "/Styles/Static/_settings.global.scss"; //Doesn't work @import "_settings.global.scss"; //Compiles but no intellisense @import "../../../../Static/Styles/_settings.global.scss"; //Compiles and intellisense works
Is there any way to get the intellisense to work with absolute paths in sass?
Hi friend,
>> Is there any way to get the IntelliSense to work with absolute paths in sass?
It seems no.
But there is workaround for you, the sass-loader to resolve this issue.
Hope it's helpful.
Best regards,
Fletch
这篇关于用于导入绝对路径的Sass intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!