Written by

Fuma Nama

At

Thu Oct 23 2025

Fumadocs MDX v13

Better cross-framework compatibility and flexibility.

Back

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.

source.config.ts
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).

tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@/.source": [".source"]
    }
  }
}

Migrate:

  • run dev server/typegen to generate a .source folder.

  • import it over the original source.generated.ts.

  • note that both docs and create-fumadocs-app are updated to .source folder.

We also supported index file generation targeting other runtimes like Bun/Node.js.

vite.config.ts
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.includeMDAST support.
  • (Vite) support useContent on client loader for lint avoidance.