nitrojs / nitrojs/nitro

more explicit way of adding modules

Open
#2,691 0 comments 5 reactions 1 assignee View on GitHub

@pi0 is already working on this.

Since Aug 23, 2024.

breaking change v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.