title: What are ASP.NET Core Static Web Assets?
body: <p>There is a lot of hidden magic that occurs in <code>HostBuilder.ConfigureWebHostDefaults()</code> (that eventually calls <a href="https://github.com/aspnet/AspNetCore/blob/1480b998660d2f77d0605376eefab6a83474ce07/src/DefaultBuilder/src/WebHost.cs#L208" rel="noreferrer"><code>ConfigureWebDefaults</code></a>). I would like to understand it better as there is no documentation that I can find about it.</p>
  
  <p><a href="https://github.com/aspnet/AspNetCore/blob/1480b998660d2f77d0605376eefab6a83474ce07/src/DefaultBuilder/src/WebHost.cs#L210" rel="noreferrer">This code</a> seems to be loading some static files. What are static web assets and why do we need them? Is this something to do with embedding static assets into libraries for Blazor?</p>
  
  <pre class="lang-cs prettyprint-override"><code>builder.ConfigureAppConfiguration((ctx, cb) =&gt;
  {
      if (ctx.HostingEnvironment.IsDevelopment())
      {
          StaticWebAssetsLoader.UseStaticWebAssets(ctx.HostingEnvironment, ctx.Configuration);
      }
  });
  </code></pre>