-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try without BlazorFrameworkFiles since they are included statically f…
…rom client project.
- Loading branch information
Showing
2 changed files
with
11 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
using Blazor.Extensions.Logging; | ||
using MyApp.Data; | ||
|
||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.Services.AddLogging(c => c | ||
.AddBrowserConsole() | ||
.SetMinimumLevel(LogLevel.Trace) | ||
); | ||
|
||
// Use / for local or CDN resources | ||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||
// builder.Services.AddScoped<AuthenticationStateProvider>(s => s.GetRequiredService<ServiceStackStateProvider>()); | ||
|
||
var apiBaseUrl = builder.Configuration["ApiBaseUrl"] ?? builder.HostEnvironment.BaseAddress; | ||
builder.Services.AddBlazorApiClient(apiBaseUrl); | ||
|
||
// builder.Services.AddScoped<ServiceStackStateProvider>(); | ||
|
||
var app = builder.Build(); | ||
|
||
BlazorConfig.Set(new BlazorConfig | ||
{ | ||
IsWasm = true, | ||
Services = app.Services, | ||
FallbackAssetsBasePath = apiBaseUrl, | ||
EnableLogging = true, | ||
EnableVerboseLogging = builder.HostEnvironment.IsDevelopment(), | ||
}); | ||
|
||
await app.RunAsync(); | ||
await builder.Build().RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters