Umbraco needs the /wwwroot
directory to work, and it’s for more than just media.
Try this fun experiment: Publish your site to a folder on your local machine, then have a look inside the /wwwroot
folder in the output.
/wwwroot
is where all of ASP.NET Core’s static files are served from by default and all of Umbraco’s (many) static assets, as well as those for any packages, will get merged into the /wwwroot
folder when published.
When you’re running in development mode locally, these assets get served directly from their NuGet packages - if you look in obj\Debug\net8.0\staticwebassets.build.json
you can see all the static assets being referenced and where they’re coming from.