Aleksander Chelpski
Aleksander Chelpski

Reputation: 771

Why bootstrap and css styles are in a server project in the new template: Blazor Web App (WebAssembly)?

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?

enter image description here

Upvotes: 0

Views: 187

Answers (2)

Henk Holterman
Henk Holterman

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

Alamakanambra
Alamakanambra

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

Related Questions