Fix deploy app-base rewrite path for published wwwroot
This commit is contained in:
@@ -112,9 +112,14 @@ function Set-FrontendAppBaseMeta {
|
||||
[Parameter(Mandatory = $true)][string]$BasePath
|
||||
)
|
||||
|
||||
$indexPath = Join-Path $PublishDir "index.html"
|
||||
if (-not (Test-Path $indexPath)) {
|
||||
throw "Publish output is missing index.html at '$indexPath'."
|
||||
$candidatePaths = @(
|
||||
(Join-Path $PublishDir "wwwroot\index.html"),
|
||||
(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*/?>'
|
||||
|
||||
Reference in New Issue
Block a user