vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.16k stars 922 forks source link

[Feature request] Re-export `vite/client` in `@vuepress/bundler-vite` #1579

Closed typed-sigterm closed 6 days ago

typed-sigterm commented 6 days ago

Clear and concise description of the problem

When using @vuepress/bundler-vite, Vite will do things like replacing environment variables. However, with pnpm, I need to manually install vite and write /// command to get correct types of import.meta.env.

Suggested solution

Add packages/bundler-vite/client.d.ts (exports as @vuepress/bundler-vite/client):

/// <reference types="vite/client" />

Alternative

No response

Additional context

No response