vite.config.ts
srcDir: "src".
Directories and files
src/worker.ts is optional. Node apps do not need it. If the file is missing, the plugin also looks at src/config/worker.ts.
Runtime
You do not add
@vitejs/plugin-react yourself — betterRouter() already includes it. Pass react: { babel: ... } if you need to.
Markdown
.md / .mdx files in routesDir are pages. See Markdown pages.