Part 16 / Topic 9 of 9
Static-host deploy basics
npm run build - re-run from this repo's root while writing this part, and it really still succeeds - compiles harness/ (this repo's own Vite project, see vite.config.js's root: mode === "test" ? "." : "harness") into a production bundle inside harness/dist/: an index.html, a hashed CSS file, and a hashed JS file, gzip-sized and reported by Vite directly in the terminal. That dist/ folder - plain static files, no server-side code required to run any of it - is the one artifact every static host below actually deploys; nothing about this repo's own dist/ gets pushed anywhere as part of this lesson, this section only documents the commands a real project's dist/ would go through next:
| Host | One-line deploy (after npm run build) |
|---|---|
| Netlify | netlify deploy --prod --dir=dist |
| Vercel | vercel --prod |
| GitHub Pages | npx gh-pages -d dist |
All three share the same shape: build first, then point the host's own CLI at the folder the build produced. None of these commands were run as part of writing this course - they're documented, not executed, the same "design-time plan, not a tested lesson" honesty stage-5-specialization/track-production-and-performance.md uses for the deploy pipeline its own track plans to build out in full, including a CI-driven deploy step, a Lighthouse budget, and route-level code-splitting on top of what this section only touches briefly.
Done here? The practice set for Part 16 — including the solutions — is on the part page.