Is your feature request related to a problem? Please describe.
Currently vite has types for import.meta.hot. However, they are not picked up by default when creating a project that uses them (Visual Studio Code, Vetur).
The error message is Property 'hot' does not exist on type 'ImportMeta'.
Describe the solution you'd like
It'd be great if the types were picked up automatically or the documentation documented what you have to add to your tsconfig.json
Describe alternatives you've considered
Currently a workaround is to copy-paste the file in question to your project.
You can just do import 'vite/hmr'
It's worth looking into make it work by default for sure
I haven't been able to get it to work out of the box, however, importing vite does work :tm:.
Simply using import "vite" throws an error [vite] Failed to resolve module import "vite/dist/index.js.map". (imported by /@modules/vite/dist/index.js) at runtime.
But, using the type-imports, it works quite fine
import type {} from "vite";
It's expected for this.By the way,you also can do it by use tsconfig.json and add vite into types inside of compilerOptions option.
Most helpful comment
It's expected for this.By the way,you also can do it by use
tsconfig.jsonand addviteintotypesinside ofcompilerOptionsoption.