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

doc: clarify conditional exports guidance #34306

Closed
wants to merge 3 commits into from

Conversation

guybedford
Copy link
Contributor

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

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. labels Jul 11, 2020
doc/api/esm.md Outdated Show resolved Hide resolved
Co-authored-by: Rich Trott <[email protected]>
doc/api/esm.md Outdated Show resolved Hide resolved
@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 14, 2020
guybedford added a commit that referenced this pull request Jul 14, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
@guybedford
Copy link
Contributor Author

Landed in e212955.

@guybedford guybedford closed this Jul 14, 2020
MylesBorins pushed a commit that referenced this pull request Jul 15, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 15, 2020
MylesBorins pushed a commit that referenced this pull request Jul 16, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
PR-URL: #34306
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants