How to compile less/sass files in Visual Studio 2017

前端 未结 5 1794
野性不改
野性不改 2020-12-23 15:54

In VS <= 2015 we can use WebEssentials extension that takes care for compiling the less/sass files for us, but currently it does not support VS 2017. Are you aware of sim

5条回答
  •  独厮守ぢ
    2020-12-23 16:17

    My previous answer worked for me for a few months, but now no longer works. When I try compiling, I get a message in the Errors window about problems with the CompilerConfig schema, and can't solve this (neither Googling nor installing/uninstalling helped).

    So an alternative answer is to use CompileSASS, which is a much simpler add-in, with (much) less online documentation, but which works beautifully. The only downsides I can see are:

    • the CSS generated is in the same folder as the SCSS, so I've had to move things around a bit in my website to accommodate this; and
    • the CSS generated is minified only, as far as I can see

    Once you've installed the add-in (I'm using VS 2017), you can go into Tools > Options to change settings:

    Here's hoping I can now resume work! Thanks to all add-in authors, by the way - don't mean to whinge.

提交回复
热议问题