fix: use standard ASP.NET Core 10 Blazor WASM runtime filename
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m52s
TaxBaik CI/CD / build-and-deploy (push) Successful in 2m52s
Root cause analysis: - App.razor referenced blazor.web.js (legacy filename) - ASP.NET Core 10 publish outputs blazor.webassembly.js (standard) - Build/publish mismatch caused 'SyntaxError: Invalid or unexpected token' Solution (proper fix, not workaround): - App.razor: change script src to blazor.webassembly.js - Remove deploy_gb.sh file-copy workaround - Program.cs: remove unnecessary comment Result: Single source of truth - blazor.webassembly.js is the standard ASP.NET Core 10 filename. No file duplication, no symlinks, no publish-time workarounds needed. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,22 +62,6 @@ if ! ss -tln | grep -q ':5001 '; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 3.5 Fix Blazor WASM runtime filename mismatch
|
|
||||||
# ASP.NET Core 10 uses blazor.webassembly.js but pages reference blazor.web.js
|
|
||||||
# Use file copy instead of symlink because ASP.NET Core static files may not handle symlinks correctly
|
|
||||||
echo "=== Fixing Blazor WASM Runtime Filename ==="
|
|
||||||
FRAMEWORK_DIR="$DEPLOY_DIR/wwwroot/_framework"
|
|
||||||
if [ -f "$FRAMEWORK_DIR/blazor.webassembly.js" ]; then
|
|
||||||
cp "$FRAMEWORK_DIR/blazor.webassembly.js" "$FRAMEWORK_DIR/blazor.web.js"
|
|
||||||
if [ -f "$FRAMEWORK_DIR/blazor.webassembly.js.gz" ]; then
|
|
||||||
cp "$FRAMEWORK_DIR/blazor.webassembly.js.gz" "$FRAMEWORK_DIR/blazor.web.js.gz"
|
|
||||||
fi
|
|
||||||
if [ -f "$FRAMEWORK_DIR/blazor.webassembly.js.br" ]; then
|
|
||||||
cp "$FRAMEWORK_DIR/blazor.webassembly.js.br" "$FRAMEWORK_DIR/blazor.web.js.br"
|
|
||||||
fi
|
|
||||||
echo "✓ Copied blazor.web.js and variants"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 4. Start the new app on the target port
|
# 4. Start the new app on the target port
|
||||||
echo "=== Starting New App on Port $TARGET_PORT ==="
|
echo "=== Starting New App on Port $TARGET_PORT ==="
|
||||||
cd "$DEPLOY_DIR"
|
cd "$DEPLOY_DIR"
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
<Routes />
|
<Routes />
|
||||||
<script src="/taxbaik/_content/MudBlazor/MudBlazor.min.js"></script>
|
<script src="/taxbaik/_content/MudBlazor/MudBlazor.min.js"></script>
|
||||||
<script src="/taxbaik/js/admin-session.js"></script>
|
<script src="/taxbaik/js/admin-session.js"></script>
|
||||||
<script src="/taxbaik/_framework/blazor.web.js"></script>
|
<script src="/taxbaik/_framework/blazor.webassembly.js"></script>
|
||||||
<script>
|
<script>
|
||||||
if (window.taxbaikAdminSession && typeof window.taxbaikAdminSession.initErrorLogging === 'function') {
|
if (window.taxbaikAdminSession && typeof window.taxbaikAdminSession.initErrorLogging === 'function') {
|
||||||
window.taxbaikAdminSession.initErrorLogging();
|
window.taxbaikAdminSession.initErrorLogging();
|
||||||
|
|||||||
@@ -397,8 +397,6 @@ if (!app.Environment.IsDevelopment())
|
|||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
app.MapHealthChecks("/healthz");
|
app.MapHealthChecks("/healthz");
|
||||||
app.MapRazorPages();
|
app.MapRazorPages();
|
||||||
|
|
||||||
// MapStaticAssets must come before MapRazorComponents to ensure _framework/* files are served
|
|
||||||
app.MapStaticAssets();
|
app.MapStaticAssets();
|
||||||
|
|
||||||
// AllowAnonymous: JWT 미들웨어가 Blazor 셸 요청을 401로 차단하지 않도록 한다.
|
// AllowAnonymous: JWT 미들웨어가 Blazor 셸 요청을 401로 차단하지 않도록 한다.
|
||||||
|
|||||||
Reference in New Issue
Block a user