René's URL Explorer Experiment


Title: Missing documentation for exports alternative paths · Issue #58600 · nodejs/node · GitHub

Open Graph Title: Missing documentation for exports alternative paths · Issue #58600 · nodejs/node

X Title: Missing documentation for exports alternative paths · Issue #58600 · nodejs/node

Description: Affected URL(s) https://nodejs.org/api/packages.html Description of the problem Packages documentation is really helpful to understand motivations and practical usage of exports, from the simplest setup to nested conditions, wildcards, e...

Open Graph Description: Affected URL(s) https://nodejs.org/api/packages.html Description of the problem Packages documentation is really helpful to understand motivations and practical usage of exports, from the simplest ...

X Description: Affected URL(s) https://nodejs.org/api/packages.html Description of the problem Packages documentation is really helpful to understand motivations and practical usage of exports, from the simplest ...

Opengraph URL: https://github.com/nodejs/node/issues/58600

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing documentation for exports alternative paths","articleBody":"### Affected URL(s)\n\nhttps://nodejs.org/api/packages.html\n\n### Description of the problem\n\nPackages documentation is really helpful to understand motivations and practical usage of `exports`, from the simplest setup to nested conditions, wildcards, etc. However, it seems to lack a description and examples of \"alternative paths\" within `exports`, which I think is really powerful stuff, but currently underrated and not very popular (maybe because of the lack in documentation).\n\nWith \"alternative paths\" what I mean is using arrays as follows:\n\n```json\n{\n    \"exports\": {\n        \".\": {\n            \"development\": {\n                \"types\": \"./src/index.ts\",\n                \"import\": \"./src/index.js\",\n                \"require\": \"./src/index.cjs\",\n                \"default\": \"./src/index.cjs\"\n            },\n            \"import\": {\n                \"types\": \"./types/index.d.ts\",\n                \"default\": [\n                    \"./src/index.js\",\n                    \"./esm/index.js\"\n                ]\n            },\n            \"require\": [\n                \"./src/index.cjs\",\n                \"./cjs/index.cjs\"\n            ],\n            \"default\": [\n                \"./src/index.cjs\",\n                \"./cjs/index.cjs\"\n            ]\n        }\n    }\n}\n```\n\nThe only hint I found in the documentation, is `string[]` syntax under [exports](https://nodejs.org/api/packages.html#exports).\n\nBeside that, there are some mentions around:\n- Webpack's official docs citing Node.js behaviour: https://webpack.js.org/guides/package-exports/#alternatives.\n- Notable TypeScript issue requesting aligning to Node.js behaviour: https://github.com/nodejs/node/issues/37928\n\nI think that \"alternative paths\" is the perfect solution for situations like using your own package without having to build it first during development (e.g., TypeScript, transpiling, polyfilling, etc.)\n\nIf there is a spec I would love to update the docs myself.\n","author":{"url":"https://github.com/ernestostifano","@type":"Person","name":"ernestostifano"},"datePublished":"2025-06-06T11:04:03Z","url":"https://github.com/nodejs/node/issues/58600"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c053175b-de2f-65cc-6dd6-9e667e331777
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id969E:1CF733:1F602A:2C5E79:6AFBFF94
html-safe-nonced4150a3a1e775917ab8f894368ec48fec663c3dfa45bc481b2906e504399a53a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjlFOjFDRjczMzoxRjYwMkE6MkM1RTc5OjZBRkJGRjk0IiwidmlzaXRvcl9pZCI6IjcwMDgwMjcwNzMxMjM0NDk4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc06e82606b854d8f789541aedaee11f9510271386d1d1ec7b0c9ffc01da042da
hovercard-subject-tagissue:3124450498
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/58600/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cf55a9d512eb078405a49f46bd4b9d7d8cc5cecce66c53e608d9379e93510862/nodejs/node/issues/58600
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cf55a9d512eb078405a49f46bd4b9d7d8cc5cecce66c53e608d9379e93510862/nodejs/node/issues/58600
og:image:altAffected URL(s) https://nodejs.org/api/packages.html Description of the problem Packages documentation is really helpful to understand motivations and practical usage of exports, from the simplest ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameernestostifano
hostnamegithub.com
expected-hostnamegithub.com
Nonefa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb3b5633a74535d9c23385512d534c66c8fde1907
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/58600#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F58600
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F58600
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/58600
Reloadhttps://github.com/nodejs/node/issues/58600
Reloadhttps://github.com/nodejs/node/issues/58600
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues644 (644)https://github.com/nodejs/node/issues
Pull requests680 (680)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/58600
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/58600
#67393https://github.com/nodejs/node/pull/67393
Missing documentation for exports alternative pathshttps://github.com/nodejs/node/issues/58600#top
#67393https://github.com/nodejs/node/pull/67393
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
https://github.com/ernestostifano
ernestostifanohttps://github.com/ernestostifano
on Jun 6, 2025https://github.com/nodejs/node/issues/58600#issue-3124450498
https://nodejs.org/api/packages.htmlhttps://nodejs.org/api/packages.html
exportshttps://nodejs.org/api/packages.html#exports
https://webpack.js.org/guides/package-exports/#alternativeshttps://webpack.js.org/guides/package-exports/#alternatives
Conditional exports doesn't respect alternative paths #37928https://github.com/nodejs/node/issues/37928
ernestostifanohttps://github.com/ernestostifano
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
on Jun 6, 2025https://github.com/nodejs/node/issues/58600#event-18020996345
https://github.com/ernestostifano
ernestostifanohttps://github.com/ernestostifano
on Jun 6, 2025https://github.com/nodejs/node/issues/58600#issuecomment-2948929221
herehttps://github.com/privatenumber/resolve-pkg-maps#why-do-the-apis-return-an-array-of-paths
https://github.com/Prakhar2275
Prakhar2275https://github.com/Prakhar2275
on Feb 14, 2026https://github.com/nodejs/node/issues/58600#issuecomment-3902468268
@ernestostifanohttps://github.com/ernestostifano
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jul 20, 2026https://github.com/nodejs/node/issues/58600#issuecomment-5019625548
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 20, 2026https://github.com/nodejs/node/issues/58600#event-28198582119
avivkellerhttps://github.com/avivkeller
not plannedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Aug 9, 2026https://github.com/nodejs/node/issues/58600#event-29170961582
ljharbhttps://github.com/ljharb
on Aug 31, 2026https://github.com/nodejs/node/issues/58600#event-30297955417
ljharbhttps://github.com/ljharb
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Aug 31, 2026https://github.com/nodejs/node/issues/58600#event-30297957422
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
4ad8171https://github.com/nodejs/node/commit/4ad8171344c5a4e23efb3f38a4d9874a9e66f626
on Nov 12, 2026https://github.com/nodejs/node/issues/58600#event-35962030788
mcollinahttps://github.com/mcollina
on Nov 12, 2026https://github.com/nodejs/node/issues/58600#event-35962275132
doc: explain fallback arrays in package exports targetshttps://github.com/mcollina/node/commit/4ad8171344c5a4e23efb3f38a4d9874a9e66f626
4ad8171https://github.com/mcollina/node/commit/4ad8171344c5a4e23efb3f38a4d9874a9e66f626
aduh95https://github.com/aduh95
on Nov 16, 2026https://github.com/nodejs/node/issues/58600#event-36262029300
doc: explain fallback arrays in package exports targetshttps://github.com/nodejs/node/commit/e396cb0bb331463c13dce8e7f6c372c8832c95ee
e396cb0https://github.com/nodejs/node/commit/e396cb0bb331463c13dce8e7f6c372c8832c95ee
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/58600
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/58600
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.