Use vite-only build for Windows release packaging.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-06 22:53:02 +08:00
parent 477ec4b120
commit f23c1b9359
2 changed files with 3 additions and 1 deletions

View file

@ -36,7 +36,8 @@ if (-not $SkipWebBuild) {
& npm.cmd install --prefix $webRoot & npm.cmd install --prefix $webRoot
if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" } if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" }
} }
& npm.cmd run build --prefix $webRoot # Release packaging skips tsc (dev CI still uses `npm run build`).
& npm.cmd run build:release --prefix $webRoot
if ($LASTEXITCODE -ne 0) { throw "web_build_failed" } if ($LASTEXITCODE -ne 0) { throw "web_build_failed" }
} }
if (-not (Test-Path (Join-Path $dist "index.html"))) { if (-not (Test-Path (Join-Path $dist "index.html"))) {

View file

@ -9,6 +9,7 @@
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc -b && vite build", "build": "tsc -b && vite build",
"build:release": "vite build",
"lint": "eslint .", "lint": "eslint .",
"preview": "vite preview" "preview": "vite preview"
}, },