Skip to content

Commit 5c9b75e

Browse files
authored
fix(types): augment vite user config (#1946)
1 parent bcb8cbf commit 5c9b75e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/node/plugin.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ import { staticDataPlugin } from './staticDataPlugin'
2121
import { slash } from './utils/slash'
2222
import { webFontsPlugin } from './webFontsPlugin'
2323

24+
declare module 'vite' {
25+
interface UserConfig {
26+
vitepress?: SiteConfig
27+
}
28+
}
29+
2430
const hashRE = /\.(\w+)\.js$/
2531
const staticInjectMarkerRE =
2632
/\b(const _hoisted_\d+ = \/\*(?:#|@)__PURE__\*\/\s*createStaticVNode)\("(.*)", (\d+)\)/g
@@ -131,7 +137,6 @@ export async function createVitePressPlugin(
131137
]
132138
}
133139
},
134-
// @ts-ignore
135140
vitepress: siteConfig
136141
})
137142
return userViteConfig

0 commit comments

Comments
 (0)