Open Rick-Anderson opened 1 month ago
Update the following code to use a manifest file and replace any app.UseStaticFiles(new StaticFileOptions code with
app.UseStaticFiles(new StaticFileOptions
var myManifestKey = builder.Configuration["MyManifestPath"] ?? "manifests/manifest.json"; /// other code app.MapStaticAssets(staticAssetsManifestPath: myManifestKey);
Helpful links:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/static-files.md
3fec6e08-fc99-7a5c-796f-3f2347cad891
@Rick-Anderson
@dazinator are you interested in updating app.UseStaticFiles(new StaticFileOptions to use app.MapStaticAssets(staticAssetsManifestPath: myManifestKey); ?
app.MapStaticAssets(staticAssetsManifestPath: myManifestKey);
cc @Spacefish,
Description
Update the following code to use a manifest file and replace any
app.UseStaticFiles(new StaticFileOptions
code withHelpful links:
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/static-files.md
Document ID
3fec6e08-fc99-7a5c-796f-3f2347cad891
Article author
@Rick-Anderson