Written by
Fuma Nama
At
Thu Oct 23 2025
Fumadocs MDX v13
Better cross-framework compatibility and flexibility.
Overview
Fumadocs MDX refined its API surface for better cross-framework compatibility and flexibility.
Plugins API
We introduced Plugins API, enabling extensible modifications to MDX configurations without bundler-specific code—ideal for file generation (e.g., types, indexes) or config alterations.
There's a json-schema plugin natively provided by Fumadocs MDX.
import jsonSchema from 'fumadocs-mdx/plugins/json-schema';
import { defineConfig, defineDocs } from 'fumadocs-mdx/config';
export const docs = defineDocs({
dir: 'content/docs',
});
export default defineConfig({
plugins: [jsonSchema()],
});Migration
Next.js
createMDXSource and resolveFiles are now relocated to fumadocs-mdx/runtime/next.
This should not affect majority of projects, as docs.toFumadocsSource() is now the preferred way.
Vite
The source.generated.ts file is now moved to .source/index.ts, you are recommended to import the .source folder (with a path alias).
{
"compilerOptions": {
"paths": {
"@/.source": [".source"]
}
}
}Migrate:
-
run dev server/typegen to generate a
.sourcefolder. -
import it over the original
source.generated.ts. -
note that both docs and
create-fumadocs-appare updated to.sourcefolder.
We also supported index file generation targeting other runtimes like Bun/Node.js.
import { defineConfig } from 'vite';
import mdx from 'fumadocs-mdx/vite';
import * as MdxConfig from './source.config';
export default defineConfig({
plugins: [
mdx(MdxConfig, {
generateIndexFile: {
runtime: 'node',
},
}),
// ...
],
});Bug Fixes
remark-include: fix Markdown stringify logics.postprocess.includeMDASTsupport.- (Vite) support
useContenton client loader for lint avoidance.