---
title: Next.js Loader
description: Customise the Next.js loader
---

## Plugin Options

Fumadocs MDX offers loaders and a Fumadocs [Source API](/docs/headless/source-api) adapter to integrate with Fumadocs.
You can configure the plugin by passing options to `createMDX` in `next.config.mjs`.

### Config Path

Customise the path of config file.

```ts
import { createMDX } from 'fumadocs-mdx/next';

const withMDX = createMDX({
  configPath: './my-config.ts',
});
```

### Development Server

When running in development mode (`next dev`), a file watcher will be started to watch for changes.
It automatically re-generates the index file in `.source` folder, ensuring Next.js hot reload is working properly.
