Press Start uses Vite as its build tool. Running a single command compiles every React component, stylesheet, and asset into a fully staticDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/press-start/llms.txt
Use this file to discover all available pages before exploring further.
dist/ directory — pure HTML, JavaScript, and CSS that can be served from any web host, CDN, or even opened directly in a browser without a Node.js server.
Building the project
Run the build command
From the repo root, execute the Vite build script:Vite bundles all React components, applies tree-shaking, and writes the output to
dist/. The process typically completes in a few seconds.Inspect the dist/ output
After a successful build the
Every HTML file references the same
dist/ directory contains:| Path | Description |
|---|---|
dist/index.html | Root HTML shell — entry point for the / route |
dist/assets/main.js | Bundled React application (all components) |
dist/assets/main.css | All component styles, merged into one sheet |
dist/assets/jsx-runtime.js | React JSX runtime, code-split for caching |
dist/pages/About.html | Static HTML shell for the /about route |
dist/pages/Projects.html | Static HTML shell for the /projects route |
dist/pages/Skills.html | Static HTML shell for the /skills route |
dist/pages/Writing.html | Static HTML shell for the /writing route |
dist/pages/CaseStudies.html | Static HTML shell for the /case-studies route |
dist/pages/Contact.html | Static HTML shell for the /contact route |
dist/.nojekyll | Empty file that disables Jekyll on GitHub Pages |
assets/main.js bundle — no per-page JavaScript is generated.Preview locally before deploying
Vite ships a production-preview server that serves the The server starts on port 4173 by default. Open http://localhost:4173 to verify the build before pushing anywhere.
dist/ directory exactly as a static host would:What the dist/ directory contains
The build output is intentionally minimal. There is no server-side rendering, no API layer, and no build artefacts beyond what a browser needs:- One JS bundle —
assets/main.jscontains the entire React component tree, React Router, and all application logic. Code-splitting is limited tojsx-runtime.jsso the runtime can be cached independently. - One CSS file —
assets/main.cssmerges every component stylesheet. The retro CRT and pixel-font styles are included here. - HTML shells —
index.htmlat the root plus one HTML file per route underpages/. Each shell is a near-empty document whose only job is to mount the React app and signal which route should render (see below).
How static HTML shells work
React Router handles all navigation on the client side. When a visitor lands on a deep URL such ashttps://example.com/pages/About.html, the server must return some HTML — it cannot invoke React. Each file under pages/ solves this problem by acting as a lightweight bootstrap document.
Every shell does three things:
- Loads the shared
assets/main.cssstylesheet so the page is styled immediately. - Runs a small inline
<script>that writes the intended route into the browser’s hash and setswindow.__STATIC_PAGE_ROUTE__so React Router knows which view to render without a round-trip. - Loads
assets/main.jsas an ES module, which mounts the full React application into<div id="root">.
pages/About.html looks like this:
window.location.hash on mount and renders the correct page component — no server configuration, no redirects, no 404s.
Environment variables
Vite exposes environment variables to the React bundle at build time throughimport.meta.env. Any variable prefixed with VITE_ in a .env file is inlined into the compiled JavaScript during npm run build.
VITE_ prefix are not included in the bundle and remain private to the build environment. There is no runtime environment — once built, the values are hardcoded into assets/main.js. Rebuild after changing any .env value.