Framework Guides
React
Deploy a React (Vite) project to Sample.app.
React apps scaffolded with Vite (via create-vite or npm create vite) output to dist/ by default, which the CLI auto-detects.
Deploy
Build your project
bash npm run build bash bun run build bash pnpm build Deploy to Sample.app
Since Vite uses dist/ by default, auto-detection works:
samplex deployOr specify the directory explicitly:
samplex deploy ./distClient-side routing
If you're using React Router or TanStack Router, Sample.app's SPA fallback serves /index.html for all unmatched routes automatically.
No additional configuration needed — client-side routing works out of the box.
Custom output directory
If you've changed the output directory in your Vite config:
export default defineConfig({
build: {
outDir: "my-output",
},
});Pass it to the deploy command:
samplex deploy ./my-outputAuto-detection only looks for dist, build, and out. If you use a custom directory name, you
must specify it explicitly.

