I’m trying to get a blazor web app (server side rendering, windows, .net8.0) to use an scss file for some variables, which I later want to import into .css files.
The MS docu mentioned AspNetCore.SassCompiler, which I’m trying to use (version is 1.77.8).
So, I’ve got a GlobalStyles/StyleSheet.scss
with one line:
$xxx-color:#aaaaaa;
and an appsettings file looking like this:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"SassCompiler": {
"Source": "GlobalStyles",
"Target": "wwwroot/css",
"Arguments": "--style=compressed --verbose",
"GenerateScopedCss": true,
"ScopedCssFolders": [ "Views", "Pages", "Shared", "Components" ]
}
}
Now, what I get is a StyleSheet.css
in the right place, but the only content is this:
/*# sourceMappingURL=StyleSheet.css.map */
And no error or other messages in the build output window in Visual Studio.
What I had expected was something like
--xxx-color: #aaaaaa;
for importing into other css files.
Is there anything I’m doing wrong here?