Skip to content

Instantly share code, notes, and snippets.

@Joren-Thijs
Last active November 6, 2020 19:09
Show Gist options
  • Save Joren-Thijs/c6018ed9d56042a71a88909d6cde47a5 to your computer and use it in GitHub Desktop.
Save Joren-Thijs/c6018ed9d56042a71a88909d6cde47a5 to your computer and use it in GitHub Desktop.
Blazor WASM project file with MSBuild Task to compile SCSS step 1
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-rc.2.20475.17" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0-rc.2.20475.17" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0-rc.2.20475.5" />
</ItemGroup>
<!-- Compile SCSS files into CSS -->
<Target Name="CompileGlobalSass" BeforeTargets="Compile">
<Message Text="Compiling global SCSS files" Importance="high" />
<Exec Command="npm run sass -- Styles:wwwroot/css" />
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment