Add yarn preview script for serving the production build

Vite already ships a preview server but it wasn't exposed in
package.json. Now: yarn build && yarn preview serves dist/ on
http://localhost:4173 with --host so it's reachable from the LAN.
This commit is contained in:
simoleo89
2026-05-12 08:42:35 +00:00
committed by Claude
parent cc225bdc5d
commit 8e0bcce7b9
+1
View File
@@ -8,6 +8,7 @@
"start": "vite --host", "start": "vite --host",
"build": "vite build && node scripts/minify-dist.mjs", "build": "vite build && node scripts/minify-dist.mjs",
"build:prod": "npx browserslist@latest --update-db && yarn build", "build:prod": "npx browserslist@latest --update-db && yarn build",
"preview": "vite preview --host",
"eslint": "eslint ./src", "eslint": "eslint ./src",
"typecheck": "tsgo --noEmit", "typecheck": "tsgo --noEmit",
"test": "vitest run", "test": "vitest run",