Browse Source
Create `staticwebassets.endpoints.json` if it doesn't exist.
pull/21784/head
maliming
1 year ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
6 additions and
1 deletions
-
framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs
|
|
|
@ -183,7 +183,12 @@ public static class AbpApplicationBuilderExtensions |
|
|
|
app.UseStaticFiles(); |
|
|
|
// Volo.Abp.AspNetCore.staticwebassets.endpoints.json is a empty file.
|
|
|
|
// https://github.com/dotnet/aspnetcore/issues/59673
|
|
|
|
return endpoints.MapStaticAssets("Volo.Abp.AspNetCore.staticwebassets.endpoints.json"); |
|
|
|
var tempStaticAssetsManifestPath = Path.Combine(AppContext.BaseDirectory, "Volo.Abp.AspNetCore.staticwebassets.endpoints.json"); |
|
|
|
if (!File.Exists(tempStaticAssetsManifestPath)) |
|
|
|
{ |
|
|
|
File.WriteAllText(tempStaticAssetsManifestPath, "{\"Version\":1,\"ManifestType\":\"Build\",\"Endpoints\":[]}"); |
|
|
|
} |
|
|
|
return endpoints.MapStaticAssets(tempStaticAssetsManifestPath); |
|
|
|
} |
|
|
|
|
|
|
|
var options = app.ApplicationServices.GetRequiredService<IOptions<AbpAspNetCoreContentOptions>>().Value; |
|
|
|
|