forked from madskristensen/WebCompiler
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Title: SCSS compiled to empty CSS with BuildWebCompiler2022 1.14.15 (works in 1.14.10)
Environment
- Visual Studio 2022 (latest at time of writing)
- .NET SDK: .NET 8.0
- Project type: ASP.NET Core Web (Sdk =Microsoft.NET.Sdk.Web)
- OS: Windows 10/11
- Package: BuildWebCompiler2022
- Working version: 1.14.10
- Problem version: 1.14.15
Project setup
.csproj (relevant parts):
net8.0enableenable
compilerconfig.json:
[
{
"outputFile": "wwwroot/Content/css/StyleSheet.css",
"inputFile": "wwwroot/Content/scss/StyleSheet.scss"
}
]
Folder structure under the project root:
- wwwroot/Content/scss/StyleSheet.scss
- wwwroot/Content/css/StyleSheet.css
Minimal SCSS content (repro):
body {
h1 {
color: green;
}
}
Steps to reproduce
- Create the project structure above withBuildWebCompiler2022 1.14.15referenced.
- Add compilerconfig.json as shown.
- Create wwwroot/Content/scss/StyleSheet.scss with the SCSS snippet above.
- Build the project in Visual Studio 2022 (or viadotnet build).
Expected behaviour
- Build succeeds.
- wwwroot/Content/css/StyleSheet.css contains:
(or equivalent expanded output).
Actual behaviour with 1.14.15
- Build succeeds (no visible errors or warnings in the Build output).
- wwwroot/Content/css/StyleSheet.css is recreated but empty (0 bytes or no CSS rules).
- If the CSS file is deleted before build, it is recreated as an empty file.
- No clear indication in the build log that compilation failed or skipped.
Comparison with 1.14.10
- If I change only the package version in the .csprojto:
- Build succeeds.
- StyleSheet.css is generated correctly with the expected CSS content.
So the same project, config, and SCSS:
- Works as expected in 1.14.10.
- Produces an empty CSS file (without errors) in1.14.15.
Notes
- Using the official sass npm package (sass wwwroot/Content/scss:wwwroot/Content/css) on the same SCSS file produces correct CSS, confirming the SCSS itself and paths are valid.
- This suggests a regression or breaking change between 1.14.10 and 1.14.15 where SCSS compilation can silently fail or produce empty output without logging an error.
body h1 {
color: green;
}
JustGentle
Metadata
Metadata
Assignees
Labels
No labels