MDX: Add vite/client types in generated file

This commit is contained in:
Fuma Nama
2025-07-31 20:14:57 +08:00
parent 85e23c2403
commit 4f8f1d6bb6
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'fumadocs-mdx': patch
---
Add `vite/client` types in generated file
+1
View File
@@ -179,6 +179,7 @@ export default function mdx(
const outdir = process.cwd();
const outFile = 'source.generated.ts';
const lines = [
'/// <reference types="vite/client" />',
`import { fromConfig } from 'fumadocs-mdx/runtime/vite';`,
`import type * as Config from '${toImportPath(configPath, {
relativeTo: outdir,