Fix deploy app-base rewrite path for published wwwroot

This commit is contained in:
2026-02-09 18:48:56 +01:00
parent 6e5bbec86e
commit 4d62d0bf50

View File

@@ -112,9 +112,14 @@ function Set-FrontendAppBaseMeta {
[Parameter(Mandatory = $true)][string]$BasePath [Parameter(Mandatory = $true)][string]$BasePath
) )
$indexPath = Join-Path $PublishDir "index.html" $candidatePaths = @(
if (-not (Test-Path $indexPath)) { (Join-Path $PublishDir "wwwroot\index.html"),
throw "Publish output is missing index.html at '$indexPath'." (Join-Path $PublishDir "index.html")
)
$indexPath = $candidatePaths | Where-Object { Test-Path $_ } | Select-Object -First 1
if ([string]::IsNullOrWhiteSpace($indexPath)) {
throw "Publish output is missing index.html. Checked: $($candidatePaths -join ", ")."
} }
$pattern = '<meta\s+name=["'']app-base["'']\s+content=["''][^"'']*["'']\s*/?>' $pattern = '<meta\s+name=["'']app-base["'']\s+content=["''][^"'']*["'']\s*/?>'