Skip to main content

Vercel build now bundles docs and the EXEPERT favicon

· One min read
Brain Research Visualizer

The Vercel deployment path now builds the Rust/WASM app and the Docusaurus docs site together, then publishes the docs from the same origin as the app.

What changed

  • Added scripts/vercel-build.sh as the Vercel build command. It prepares Rust, installs the wasm32-unknown-unknown target and wasm-pack, runs the Vite production build, builds docs-site/, and merges the rendered docs into dist/.
  • Added scripts/copy-docs-build.mjs to copy docs-site/build into dist/ while skipping the docs site's root index.html. The app stays mounted at /, and Docusaurus pages are available under routes like /docs/getting-started/introduction/.
  • Replaced hardcoded localhost:3000 documentation links with environment-aware links. Local app origins use http://localhost:3000; production uses the app's deployed origin unless VITE_DOCS_URL is explicitly set.
  • Added EXEPERT favicon assets for the app and docs site: public/favicon.png, public/favicon-32.png, public/favicon-192.png, public/apple-touch-icon.png, and docs-site/static/img/favicon.png.

Deployment note

Set Vercel's Build Command to:

bash scripts/vercel-build.sh

Leave the Output Directory as dist. Do not set VITE_DOCS_URL for the normal Vercel deployment unless the docs are intentionally hosted somewhere else.