Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more explicit way of adding modules #2691

Open
pi0 opened this issue Aug 23, 2024 · 0 comments
Open

more explicit way of adding modules #2691

pi0 opened this issue Aug 23, 2024 · 0 comments
Assignees

Comments

@pi0
Copy link
Member

pi0 commented Aug 23, 2024

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 pi0 self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant