mirror of
https://github.com/Cysharp/R3.git
synced 2026-10-29 15:26:45 +08:00
22 lines
655 B
C#
22 lines
655 B
C#
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using R3;
|
|
|
|
namespace BlazorWebAssemblyApp1;
|
|
public class Program
|
|
{
|
|
public static async Task Main(string[] args)
|
|
{
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
|
|
|
// Add this line
|
|
builder.Services.AddBlazorWebAssemblyR3();
|
|
|
|
await builder.Build().RunAsync();
|
|
}
|
|
}
|