nitro
nitro copied to clipboard
more explicit way of adding modules
Background: some thoughts here.
Nitro modules should be explicitly imported and configured in the user config. Pretty much how a rollup or vite plugin can be configured.
- avoid auto scanning
server/modulesdirectory (can be still used by users as convention, but needs explicit import) - remove support of passing modules as string in config
While this is a breaking change for v3, we never publicly documented modules feature and initial support was also added as an advanced feature. This pattern is also tried on nitro-cloudflare-dev module and proven to work nice.