Modulight provide a template project for Blazor hosting with Razor Component Client modules.
Use the package Modulight.UI.Blazor to try it.
It provides a navigation layout generated by client modules.
First implement a custom Blazor UI provider.
class CustomBlazorUIProvider : BlazorUIProvider
{
public CustomBlazorUIProvider(IRazorComponentClientModuleCollection razorComponentClientModuleCollection) : base(razorComponentClientModuleCollection)
{
}
}
Then use the provider.
builder.ConfigureBlazorUI();
builder.Services.AddModules(builder =>
{
builder.UseRazorComponentClientModules().AddBlazorUI<CustomBlazorUIProvider>();
});
It needs the package Modulight.UI.Blazor.Hosting to support prerendering.
See README for details.