mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
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:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user