This is an open discussion to track the module system's progress and centralize information.
Hello,
The current implementation of the module system is somewhat limited.
I propose a change (https://github.com/unjs/nitro/pull/2686) to make the module system more similar to Nuxt's, with auto-generated types based on the module options.
Describe the feature
This is an open discussion to track the module system's progress and centralize information.
Hello,
The current implementation of the module system is somewhat limited.
I propose a change (https://github.com/unjs/nitro/pull/2686) to make the module system more similar to Nuxt's, with auto-generated types based on the module options.
This will generate type augmentation for
NitroConfig
, enabling autocompletion innitro.config.ts
:In the previous snippet, an error will occur because
foo
must be an object.However, the module system could also be reworked to resemble a Vite plugin (https://github.com/unjs/nitro/pull/2686#issuecomment-2305913286).
And here's the corresponding
nitro.config.ts
:Additional information