Replies: 1 comment 5 replies
-
|
I love the My only concern (from the Vite team perspective) is that if this would open the door for other tools to keep augmenting the Vite Plugin API (like package.json). But for the case of Nitro, IMO, it would be important enough to deserve having this field. I referenced this discussion to the Vite/Vite+ teams to see if we can have a consensus on this. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
A POC version landed via #3712
Nitro (similar to Nuxt) has a concept of "Modules" which are basically build time plugins that can hook into the
nitrobuilder instance, to modify config, add integrations, add routes, hook into build lifecycle, etc.The format of modules is either a function or an
{ name, setup }object:In order to register modules, they go to Nitro config:
Or with Vite+Nitro:
In vite projects, it would feel more natural if everything is just a vite plugin. Thefore something like this:
In order to make this working, we need to support a new interopablable module namespace format with
nitrohook:or
Then Nitro vite plugin can try to find those from user config and apply plugins with
nitrokey/hook as modules to extend Nitro instance.--
/cc @nitrojs/vite
Beta Was this translation helpful? Give feedback.
All reactions