-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Labels
Description
💻
- Would you like to work on this feature?
What problem are you trying to solve?
Congrats for the babel 8 RC release.
I've tried it out with @vitejs/plugin-legacy (vitejs/vite#21555). While the functionality worked fine, it seems there are some room to improve the types. Here are the list of things I noticed:
PluginItemandPluginObjectandPresetObjectis exported. ButPresetItemis not exported, it would be helpful if that one is exported. Also it would be helpful ifPresetTargetandPluginTargetare exported.- the types of plugins does not satisfy
PluginItemtype.PluginItemtype accepts(api: PluginAPI, options?: object, dirname?: string) => PluginObject- the types of plugins are
(api: PluginAPI, options: object, dirname: string) => PluginObject<object & PluginPass<object>>(optionsanddirnameare required)
- the types of presets does not satisfy
PresetItemtype.PluginItemtype accepts(api: PresetAPI, options?: object, dirname?: string) => PresetObject- the types of plugins are
(api: PresetAPI, options: Options, dirname: string) => PresetObject(optionsanddirnameare required)
Describe the solution you'd like
Fix the type issues above.
Describe alternatives you've considered
Keep it as-is.
Documentation, Adoption, Migration Strategy
No response
Reactions are currently unavailable