WebCompiler
WebCompiler copied to clipboard
Issue compiling partial .scss files in folders
Installed product versions
- Visual Studio: 2022 Community
- This extension: [1.14.10]
Description
I have an issue compiling a nested scss file. In the picture I modify the partial file _grid-auto-fit.scss then save and build the project. The .css in the output folder does not contain my modification. This happens to all to all partial files except main.scss which is not a partial. This happens despite having installed and activated "Enable compile on build...".
The main.scss file looks like this:
When I make and modification to the main.scss file then save and build it works as expected and the resulting main.css contains the code from the @use folders in the picture.
My compilerconfig.json file looks like this:
[ { "outputFile": "Content/output/main.css", "inputFile": "Content/scss/main.scss", "minify": { "enabled": false } } ]
I have also enabled before build in the Task Runner Explorer.
My settings looks like this:
///<binding BeforeBuild='Content/scss/main.scss, All files' />
My problem seems to be similar to this one which supposedly is fixed: https://github.com/madskristensen/WebCompiler/issues/191 and this one https://github.com/madskristensen/WebCompiler/issues/185
Am I doing something wrong or is this not supported?
Steps to recreate
- Clone my project: https://github.com/Gugge1999/Web-Forms-Playground
- Modify a nested file .scss inside any of the folders then save and build the project.
Current behavior
The nested file does not have the modifications after saving and building
Expected behavior
The nested file should have the modifications after saving and building
I ended up using this solution instead: https://jacobdixon.uk/2020/10/compile-scss-at-build-time-visual-studio/ without the FastBuild part.
Much simpler, does not rely on an extension and you get more control over the generated css.