dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.61k stars 25.3k forks source link

3.0: Scripts and related static assets are now referenced as local files instead of using CDNs based on the current environment. #14350

Open Rick-Anderson opened 5 years ago

Rick-Anderson commented 5 years ago

See Scripts and related static assets are now referenced as local files instead of using CDNs based on the current environment. in https://devblogs.microsoft.com/aspnet/asp-net-core-and-blazor-updates-in-net-core-3-0-preview-7/

We will provide samples and documentation for adding these features to new apps as needed.

Rick-Anderson commented 5 years ago

------------------- OUTLINE ------------------------------

Add static assets from a CDN with the Environment Tag Helper

The ASP.NET Core 1.x and 2.x web app templates used the [Environment Tag Helper](link here) to include static assets provided by various CDNs. One way to add CDN assets to an ASP.NET Core 3.0 and later app:

Comparing 2.2 with 3.0 versions

Generate a 2.2 and 3.0 version of each desired template and compare the layout files. Alternatively, select the following links to download the layout file:

Use a difference tool such as Visual Studio to compare the files.

The following image shows the Visual Studio generated difference of the ASP.NET Core 3.0 Razor Pages template layout file with the 2.2 version:

Show image here

The red boxes in the preceding image shows markup in the 2.2 Razor Pages layout file removed from the 3.0 version.

Show code snippets here they can copy/paste here

Update version numbers

Show them how to update static content. For example

Rick-Anderson commented 5 years ago

@danroth27 @scottaddie please review outline and priority

Rick-Anderson commented 4 years ago

@danroth27 @scottaddie please review outline and priority

scottaddie commented 4 years ago

Some thoughts: