Build & preview
Production build
pnpm build
Like dev, the build compiles the WASM module and the vanilla logger first,
then runs vite build:
"build": "pnpm run build:wasm && pnpm run build:vanilla-logger && vite build"
The output goes to dist/. The Vite config builds three HTML entry points:
| Entry | Source | Purpose |
|---|---|---|
main | index.html | The modern EXEPERT app. |
vanilla | vanilla.html | A pristine legacy three.js r70 reference. |
v1 | v1.html | The legacy renderer inside the modern UI shell. |
The three package is split into its own chunk (manualChunks), the build
targets es2022, emits source maps, and minifies with Terser. See
Reference Pages for what the vanilla and
v1 entries are for.
Vercel production build
Use this build command in Vercel:
bash scripts/vercel-build.sh
The script exists because the app has a Rust/WASM build step and because the public docs are served from the same production origin as the app.
It performs the deployment build in this order:
- Adds Rust to
PATH, installs Rustup if needed, and ensures thewasm32-unknown-unknowntarget is available. - Installs
wasm-packwhen the builder image does not already have it. - Runs
pnpm build, which produces the Vite app indist/. - Installs and builds
docs-site/. - Runs
node scripts/copy-docs-build.mjsto copy the Docusaurus build intodist/.
scripts/copy-docs-build.mjs copies the top-level Docusaurus build entries into
dist/ but deliberately skips the docs site's root index.html. That keeps the
EXEPERT app homepage as the production root while still publishing routes like
/docs/getting-started/introduction/, /blog/, and /assets/.
Leave VITE_DOCS_URL unset for the normal Vercel deployment. Production builds
use the current origin for documentation links, so the top-nav Docs button and
observability help links resolve to the deployed site instead of
localhost:3000. Local app origins default those links to
http://localhost:3000, which matches the Docusaurus dev server started from
docs-site/.
The favicon assets used by the production app live in public/:
favicon.pngfavicon-32.pngfavicon-192.pngapple-touch-icon.png
The docs site uses the matching docs-site/static/img/favicon.png.
Preview
Serve the built dist/ locally:
pnpm preview
This runs vite preview --port 9001.
Server-side render (optional)
An SSR entry exists for producing a static HTML shell:
pnpm build:ssr
It runs vite build --ssr src/entry-server.ts --outDir dist/server.
src/entry-server.ts returns a static shell that hydrates on the client; it is
opt-in and not part of the default build.
Verifying a change
| Command | Checks |
|---|---|
pnpm typecheck | tsc --noEmit over the TypeScript sources. |
pnpm test | Vitest: currently the telemetry-contract test. |
cargo test --workspace | The Rust unit tests in both crates. |
See Testing & CI for details on what each suite covers.