What's different from the default setup of react-router example
@mdx-js/rollup
installation and config atvite.config.ts
to use.mdx
files atsrc/pages
:
// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import generouted from '@generouted/react-router/plugin'
import mdx from '@mdx-js/rollup'
export default defineConfig({ plugins: [{ enforce: 'pre', ...mdx() }, react(), generouted()] })
Add the home page by creating a new file src/pages/index.mdx
→ /
:
### Header
**Bold**, _italic_ and `inline-code`
Run this example online via StackBlitz: