From 33aa2adaeaaa9a6d0c693666c46ea5c8a740409b Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 4 Jul 2026 12:13:43 +0900 Subject: [PATCH] fix: add MapRazorComponents registration for Blazor WebAssembly clients - Register Admin WASM client (TaxBaik.Web.Client) - Register Portal WASM client (TaxBaik.Portal.Client) - This enables blazor.boot.json generation during publish - Fixes 'unhandled exception' error in browser console Co-Authored-By: Claude Haiku 4.5 --- src/TaxBaik.Web/Program.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/TaxBaik.Web/Program.cs b/src/TaxBaik.Web/Program.cs index 5d74378..266e2fe 100644 --- a/src/TaxBaik.Web/Program.cs +++ b/src/TaxBaik.Web/Program.cs @@ -392,6 +392,18 @@ app.MapHealthChecks("/healthz"); app.MapRazorPages(); // Sitemap.cshtml, Rss.cshtml, Feed.cshtml app.MapStaticAssets(); +// Blazor WebAssembly Admin Client +app.MapRazorComponents() + .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(TaxBaik.Web.Client._Imports).Assembly) + .AllowAnonymous(); + +// Portal WASM Client +app.MapRazorComponents() + .AddInteractiveWebAssemblyRenderMode() + .AddAdditionalAssemblies(typeof(TaxBaik.Portal.Client._Imports).Assembly) + .AllowAnonymous(); + // SPA 라우팅 폴백 (가장 마지막에!) app.MapFallbackToFile("admin/{*path:nonfile}", "admin/index.html"); app.MapFallbackToFile("portal/{*path:nonfile}", "portal/index.html");