Skip to content

doc: clarify conditional exports guidance

This updates the conditional exports examples to split on the "node" and "default" conditions over encouraging a "browser" and "default" split by default.

The notes are also updated to provide this guidance that a "default" fallback as the more universal style code is a recommended pattern to ensure package forward compatibility in JS workflows.

Wording adjustments welcome.

//cc @nodejs/modules-active-members

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading