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):
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 installvite
and write///
command to get correct types ofimport.meta.env
.Suggested solution
Add
packages/bundler-vite/client.d.ts
(exports as@vuepress/bundler-vite/client
):Alternative
No response
Additional context
No response