WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

Issue compiling partial .scss files in folders

Open Gugge1999 opened this issue 1 year ago • 1 comments

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...". Screenshot_20230204_040741

The main.scss file looks like this: Screenshot 2023-03-03 182012312312309

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

  1. Clone my project: https://github.com/Gugge1999/Web-Forms-Playground
  2. 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

Gugge1999 avatar Mar 03 '23 17:03 Gugge1999

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.

Gugge1999 avatar Mar 11 '23 10:03 Gugge1999