am-freescan/scripts/start-frontend.ps1

20 lines
444 B
PowerShell
Raw Normal View History

param(
[switch]$Dev,
[switch]$SkipBuild
)
2026-10-22 16:18:37 +08:00
$ErrorActionPreference = 'Stop'
$taskRoot = Split-Path -Parent $PSScriptRoot
Set-Location (Join-Path $taskRoot 'am-web')
if ($Dev) {
pnpm dev
} else {
if (-not $SkipBuild) {
pnpm build:local
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
# Same origin and port as development; preview inherits API/stream/WS proxy.
pnpm exec vite preview --mode env.local
}
2026-10-22 16:18:37 +08:00
exit $LASTEXITCODE