You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I recently upgraded my project to use Vite v6. However, I encountered type conflicts between VitePress and my project due to VitePress using Vite v5. The error message is as follows:
Type 'import("/code/node_modules/vite/dist/node/index").PluginOption' is not assignable to type'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").PluginOption'.
Type 'Plugin<any>' is not assignable to type'PluginOption'.
Type 'import("/code/node_modules/vite/dist/node/index").Plugin<any>' is not assignable to type'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").Plugin<any>'.
Types of property 'apply' are incompatible.
Type '"serve" | "build" | ((this: void, config: import("/code/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined' is not assignable to type'"serve" | "build" | ((this: void, config: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined'.
Type '(this: void, config: UserConfig, env: ConfigEnv) => boolean' is not assignable to type'"serve" | "build" | ((this: void, config: UserConfig, env: ConfigEnv) => boolean) | undefined'.
Type '(this: void, config: import("/code/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vite/dist/node/index").ConfigEnv) => boolean' is not assignable to type'(this: void, config: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").ConfigEnv) => boolean'.
Types of parameters 'config' and 'config' are incompatible.
Type 'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").UserConfig' is not assignable to type'import("/code/node_modules/vite/dist/node/index").UserConfig'.
Types of property 'plugins' are incompatible.
Type 'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").PluginOption[] | undefined' is not assignable to type'import("/code/node_modules/vite/dist/node/index").PluginOption[] | undefined'.
Type 'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").PluginOption[]' is not assignable to type'import("/code/node_modules/vite/dist/node/index").PluginOption[]'.
Type 'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").PluginOption' is not assignable to type'import("/code/node_modules/vite/dist/node/index").PluginOption'.
Type 'Plugin<any>' is not assignable to type'PluginOption'.
Type 'import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").Plugin<any>' is not assignable to type'import("/code/node_modules/vite/dist/node/index").Plugin<any>'.
Types of property 'apply' are incompatible.
Type '"serve" | "build" | ((this: void, config: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vitepress/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined' is not assignable to type'"serve" | "build" | ((this: void, config: import("/code/node_modules/vite/dist/node/index").UserConfig, env: import("/code/node_modules/vite/dist/node/index").ConfigEnv) => boolean) | undefined'.
Type '(this: void, config: UserConfig, env: ConfigEnv) => boolean' is not assignable to type'"serve" | "build" | ((this: void, config: UserConfig, env: ConfigEnv) => boolean)
Describe the solution you'd like
To resolve this, could you please upgrade VitePress to use Vite v6? This will help avoid type conflicts and ensure compatibility with projects using the latest version of Vite.
It is planned (#4467). Some features don't work properly, but you can force vite 6 using overrides (npm, pnpm). It should work fine if you're not using data and path loaders.
Is your feature request related to a problem? Please describe.
I recently upgraded my project to use Vite
v6
. However, I encountered type conflicts between VitePress and my project due to VitePress using Vitev5
. The error message is as follows:Describe the solution you'd like
To resolve this, could you please upgrade VitePress to use Vite
v6
? This will help avoid type conflicts and ensure compatibility with projects using the latest version of Vite.Describe alternatives you've considered
No response
Additional context
The plugins causing this issue are
vite-plugin-vue-devtools
andvite-plugin-vuetify
. These plugins are used in the Vite configuration within VitePress:Validations
The text was updated successfully, but these errors were encountered: