50c9db785a
ci / rust (push) Has been cancelled
New standalone app at docs-site/ — Fumadocs (fumadocs-core/ui 16, fumadocs-mdx
15) on TanStack Start (Vite 7 + nitro-v2 bun preset, React 19, Tailwind 4),
mirroring the web/ console stack but with no auth/i18n/orval — docs stay public.
- catch-all docs route (routes/docs/$.tsx), Orama search (routes/api/search.ts),
RootProvider shell, MDX component map, shared nav, custom 404
- content/docs/: hand-written index.mdx + meta.json nav, plus 7 pages imported
from repo docs/ + README (leading H1 stripped, YAML frontmatter added; kept as
.md so existing </{ don't trip MDX JSX). Content is a one-time snapshot.
- mdx() is plugins[0]; tsconfig collections/* -> ./.source/*; SSR search variant;
@source for fumadocs-ui classes. Generated .source/routeTree/dist/.output ignored.
Verified: bun run build (client+SSR+nitro) green, tsc clean, dev + prod servers
serve all routes 200 with SSR content + nav, search returns hits, 404 works.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import tsConfigPaths from 'vite-tsconfig-paths'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import mdx from 'fumadocs-mdx/vite'
|
|
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
|
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
|
|
import viteReact from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
server: { port: 3001 },
|
|
plugins: [
|
|
// Fumadocs MDX must run first: it registers the resolver/loader that transforms
|
|
// .md/.mdx and emits the `.source` typegen (the `collections/*` virtual modules the
|
|
// docs route imports), before route generation and the React transform.
|
|
mdx(),
|
|
tsConfigPaths({ projects: ['./tsconfig.json'] }),
|
|
tailwindcss(),
|
|
// Full SSR on the TanStack Start runtime; the docs render server-side then hydrate.
|
|
tanstackStart(),
|
|
// Nitro v2 is the deployment target: the `bun` preset bundles a Bun-runnable server
|
|
// to .output/ (`bun run .output/server/index.mjs`), matching the rest of the project.
|
|
nitroV2Plugin({
|
|
preset: 'bun',
|
|
compatibilityDate: '2026-06-12',
|
|
}),
|
|
// Must come AFTER tanstackStart — provides the React JSX transform + Refresh runtime
|
|
// that Start's dev mode requires.
|
|
viteReact(),
|
|
],
|
|
})
|