Search code examples
c#.net-coreblazor.net-5blazor-client-side

Blazor Client Size - Should you add wwwroot/css to the .gitignore file?


I've been playing with Blazor Client Side and I have some questions about the basic project setup.

Should I be committing everything in \Client\wwwroot\css\?

It contains two libraries

  1. Bootstrap 4
  2. Open Iconic

I would imagine they are managed through Nuget packages, which means it should pull the version specified when you build?

How does this all work?


Solution

  • No these are static directories/files unrelated to any Nuget Packages. They are just what comes with the template for CSS formatting. So don't .gitignore them. There's a short article here covering CSS in Blazor which shows you one way of setting up CSS in Blazor using SASS and covers Component based Scoped CSS.