Skip to content

Commit 1b0fbad

Browse files
authored
Apply suggestions from code review
1 parent d061672 commit 1b0fbad

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

aspnetcore/migration/80-90.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ Optimize the handling of static files in your web apps by replacing <xref:Micros
7878
- app.UseStaticFiles();
7979
+ app.MapStaticAssets();
8080
```
81+
8182
In MVC & Razor Pages apps you additionally need to chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the <xref:fundamentals/static-files?view=aspnetcore-9.0&preserve-view=true>.
8283

83-
ASP.NET Core will automatically fingerprint and precompress your static files at build and publish time and then `MapStaticAssets` will surface the optimized files as endpoints using endpoint routing with appropriate caching headers.
84+
ASP.NET Core automatically fingerprints and precompresses your static files at build and publish time, and then <xref:Microsoft.AspNetCore.Builder.StaticAssetsEndpointRouteBuilderExtensions.MapStaticAssets%2A> surfaces the optimized files as endpoints using endpoint routing with appropriate caching headers.
8485

8586

8687

@@ -96,17 +97,20 @@ To resolve the fingerprinted file names from your app:
9697
9798
* In MVC & Razor Pages apps, the script and link tag helpers will automatically resolve the fingerprinted file names.
9899
99-
To resolve the fingerprinted file names when importing JavaScript modules, add a generated [import map](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap):
100+
To resolve the fingerprinted file names when importing JavaScript modules, add a generated [import map](https://developer.mozilla.org/docs/Web/HTML/Element/script/type/importmap):
100101
101102
* In Blazor apps, add the (<xref:Microsoft.AspNetCore.Components.ImportMap>) component to the `<head>` content of the app's root component, typically in the `App` component (`App.razor`):
102103
103104
```razor
104105
<ImportMap />
105106
```
106107

107-
* In MVC & Razor pages apps, add `<script type="importmap"></script>` to the head of the main layout file, which will be updated by the import map tag helper.
108+
* In MVC & Razor pages apps, add `<script type="importmap"></script>` to the head of the main layout file, which is updated by the Import Map Tag Helper.
108109

109-
For more information, see <xref:blazor/fundamentals/static-files>.
110+
For more information, see the following resources:
111+
112+
* <xref:aspnetcore-9.0#static-asset-delivery-optimization>
113+
* <xref:blazor/fundamentals/static-files>
110114

111115
## Blazor
112116

0 commit comments

Comments
 (0)