nitro icon indicating copy to clipboard operation
nitro copied to clipboard

more explicit way of adding modules

Open pi0 opened this issue 1 year ago • 0 comments

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/modules directory (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.

pi0 avatar Aug 23 '24 13:08 pi0