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
When I integrate VitePress into a Vue + TypeScript project created with Vite, VitePress fails to start if the @vitejs/plugin-vue plugin is included in the plugins array of vite.config.ts. However, VitePress starts successfully if I remove the @vitejs/plugin-vue plugin from the configuration.
Reproduction
Create a Vue + TypeScript project using Vite.
Integrate VitePress into the project.
Include @vitejs/plugin-vue in the plugins array of vite.config.ts.
Attempt to start VitePress, which results in an error and prevents it from starting.
Remove @vitejs/plugin-vue from vite.config.ts.
VitePress starts successfully without the plugin.
Expected behavior
VitePress should be able to start without any issues even with @vitejs/plugin-vue included in the vite.config.ts configuration.
This is because vitepress adds that plugin by default, duplicating it in the chain. You can add this to .vitepress/config.ts
vite: {configFile: false}
It will disable vite.config.ts auto-discovery when running vitepress. You'll need to copy any additional vite settings (except vue plugin) in .vitepress/config.ts too.
Alternatively you can configure a different root for vitepress (i.e. keep it inside docs/ or something instead of using cwd as root for both your vite app and docs).
Describe the bug
When I integrate VitePress into a Vue + TypeScript project created with Vite, VitePress fails to start if the @vitejs/plugin-vue plugin is included in the plugins array of vite.config.ts. However, VitePress starts successfully if I remove the @vitejs/plugin-vue plugin from the configuration.
Reproduction
Expected behavior
VitePress should be able to start without any issues even with @vitejs/plugin-vue included in the vite.config.ts configuration.
System Info
Additional context
stackblitz demo
Validations
The text was updated successfully, but these errors were encountered: