Skip to content

doc: explain exports target fallback arrays#63340

Closed
MukundaKatta wants to merge 1 commit into
nodejs:mainfrom
MukundaKatta:codex/doc-exports-target-arrays
Closed

doc: explain exports target fallback arrays#63340
MukundaKatta wants to merge 1 commit into
nodejs:mainfrom
MukundaKatta:codex/doc-exports-target-arrays

Conversation

@MukundaKatta
Copy link
Copy Markdown

Refs: #58600

This documents package exports array targets, including:

  • array items are tried in order until one resolves for the active conditions
  • array items can contain strings, null, nested condition objects, or nested arrays
  • Node.js does not use arrays as file-existence fallbacks after a string target resolves

Validation:

  • node tools/lint-md/lint-md.mjs doc/api/packages.md
  • git diff --check

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label May 15, 2026
Comment thread doc/api/packages.md
#### Package target fallback arrays

Export targets can also be arrays. Each array item is tried in order until
Node.js finds a target that resolves for the current package subpath and
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also tries until it can understand the syntax - for example, in node versions 13.2-13.7 iirc, the only format supported is a string, so these versions will skip an object and fall back to the next item.

@aduh95
Copy link
Copy Markdown
Contributor

aduh95 commented May 15, 2026

It seems you are using a LLM to open PRs at a rate that's not humanely sustainable, without following up at all on the feedback received, please stop, this is not bringing any value and is wasting our time. If you keep opening more PRs, you'll get blocked.

@aduh95 aduh95 closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants