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
|
[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*/?>'
|
||||||
|
|||||||
Reference in New Issue
Block a user