none
Sass intellisense for importing absolute paths

    Question

  • 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?
    Tuesday, January 31, 2017 11:35 AM

All replies

  • 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


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, February 02, 2017 8:33 AM