nitrojs / nitrojs/nitro

Bundle matched env for runtime config

Open
#3,400 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the feature

(from discussion with @danielroe)

Runtime config allows overriding declared key/values in runtime with NITRO_ prefixed environment variables.

It is also possible to bundle build time environment variables explicitly in nitro config by using X: process.env.NITRO_X || "default"

Wee can make DX better by automatically inferring matched envs as default from build to production environment with same convention.

This behavior change might be unsafe and cause leaking build-specific variables to production bundle exposed, so should be in v3 or under explicit flag.

Additional information
  • Would you be willing to help implement this feature?

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.

Research direction

No files, tests, or entry points are named. Start by locating Nitro's runtime-config handling and build-time environment inference, then determine how NITRO_-prefixed values would be matched and bundled. Done means the behavior is safely scoped to v3 or an explicit flag, with protection against exposing unintended build-specific variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.