Reputation: 771
I have installed .NET 8 and created Blazor Web App (WebAssembly) using the new template. Why bootstrap and css styles are in a server project by default? Why not a client project?
Upvotes: 0
Views: 187
Reputation: 273464
Why bootstrap and css styles are in a server project by default?
Because the server project is hosting the client. The wwwroot folder is 'shared' between the Server components and the Client.
After deployment there is no concept of a wwwroot or other folders on the Client side, it only has its <base href="..." />
that the Server maps to its wwwroot.
Upvotes: 1
Reputation: 7871
Your app can easily work without the Client project (using ssr or server interactivity), but not vice versa.
Client project is there to ensure you have all the parts for wasm interactivity in one place - because they ALL get downloaded to the browser if you use wasm interactivity.
Upvotes: 0