Production Build
Build Command
bash
npm run buildThis runs tsc && vite build -- TypeScript type checking followed by Vite's production build.
Output Directory
All build artifacts are written to dist/.
Build Output
dist/
index.html
assets/
index-[hash].js
index-[hash].cssindex.html-- the application entry pointassets/index-[hash].js-- bundled JavaScript with content hash in the filenameassets/index-[hash].css-- bundled stylesheet with content hash in the filename
Static Assets
Files in the public/ directory are copied to dist/ without modification:
favicon.pngog-image.pngrobots.txtsitemap.xmlsw.js
Content-Hashed Filenames
Vite appends a content hash to asset filenames (e.g., index-a1b2c3d4.js). This enables immutable caching: the filename changes only when the file content changes, so browsers and CDNs can cache these assets indefinitely without serving stale content.
Serving the Build
bash
npm startThis runs node server.js, which starts the Fastify production server on port 6001. See Server Configuration for details.