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.
Plugin install functions are missing types.
import{createServer}from'vite'// Hacky, bad ideatypePluginOptions={root: string,app: any,server: any,watcher: any}constmyPlugin=({
root,
app,
server,
watcher
}: PluginOptions)=>{// do plugin-y things here}createServer({plugins: [myPlugin],}).listen(3000)
I first ended up writing a hacky shim like the above and then eventually figured out koa's type situation (they have a few fragmented @types packages)
Describe the solution you'd like
A better DX. Can we ship some types for the plugin install function?
Additional context
I'm unsure how 3rd party type interop is supposed to work. Is it even Vite's job to provide a PluginOptions type that contains Koa and Chokidar types? 🤔
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Plugin install functions are missing types.
I first ended up writing a hacky shim like the above and then eventually figured out koa's type situation (they have a few fragmented @types packages)
Describe the solution you'd like
A better DX. Can we ship some types for the plugin install function?
Additional context
I'm unsure how 3rd party type interop is supposed to work. Is it even Vite's job to provide a
PluginOptions
type that contains Koa and Chokidar types? 🤔The text was updated successfully, but these errors were encountered: