René's URL Explorer Experiment


Title: esm modules documentation doesn't describe how to implement a module · Issue #28060 · nodejs/node · GitHub

Open Graph Title: esm modules documentation doesn't describe how to implement a module · Issue #28060 · nodejs/node

X Title: esm modules documentation doesn't describe how to implement a module · Issue #28060 · nodejs/node

Description: I read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of import, it doesn't describe how to export a module. Unless I very much missed it, there is not even a single example of a ESM module. I know, ...

Open Graph Description: I read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of import, it doesn't describe how to export a module. Unless I very much missed it, there is not even a ...

X Description: I read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of import, it doesn't describe how to export a module. Unless I very much missed it, there is not eve...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"esm modules documentation doesn't describe how to implement a module","articleBody":"I read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of `import`, it doesn't describe how to `export` a module. Unless I very much missed it, there is not even a single example of a ESM module.\r\n\r\nI know, `import` and `export` are part of the language base, and node's documentation doesn't cover the Javascript language. In this case, I think its necessary to at least have a single example, such as:\r\n```\r\nexport function whatever() {};\r\nexport function somethingElse() {};\r\nexport default {\r\n  whatever,\r\n   somethingElse,\r\n};\r\n```\r\n\r\nNot having this makes the import docs hard to understand, they talk a lot about \"exports\" and \"default exports\", but without defining them.\r\n\r\nAlso, having read through ~600 lines of documentation on ECMAscript modules and still having to scrape the internet to figure out how to write one is not a great documentation experience :-).\r\n\r\n\u003c!--\r\nThank you for reporting a possible bug in Node.js.\r\n\r\nPlease fill in as much of the template below as you can.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify the affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you can.\r\n-->\r\n\r\n* **Version**: master/12\r\n* **Platform**: any\r\n* **Subsystem**: doc\r\n\r\n\u003c!-- Please provide more details below this comment. -->\r\n","author":{"url":"https://github.com/sam-github","@type":"Person","name":"sam-github"},"datePublished":"2019-06-04T17:33:15Z","url":"https://github.com/nodejs/node/issues/28060"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8861d9fd-c487-a409-aa00-9ae7e38ddd10
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id83DA:55AC6:792B4F:9D8AD8:6AED32A7
html-safe-noncea6d3ebd899e1302efee1818cbdd33baf6e7cfb9ee9b14e41a7f1821258b5fca5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0RBOjU1QUM2Ojc5MkI0Rjo5RDhBRDg6NkFFRDMyQTciLCJ2aXNpdG9yX2lkIjoiNjA5MzU2MjYzNDg1MTY2MDQ1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5f55500ce4c0381f5b8a36c8433aa62855bb6fd266ed36e6c3256a923e7244de
hovercard-subject-tagissue:452120222
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/28060/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e13b80c42aea8c2cb2fabc166536cdbebe50212aec363709512ac2b3beafcc66/nodejs/node/issues/28060
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e13b80c42aea8c2cb2fabc166536cdbebe50212aec363709512ac2b3beafcc66/nodejs/node/issues/28060
og:image:altI read https://nodejs.org/api/esm.html and found that while it had good/exhaustive coverage of import, it doesn't describe how to export a module. Unless I very much missed it, there is not even a ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesam-github
hostnamegithub.com
expected-hostnamegithub.com
Nonee51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a
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
release59ebb7b901cc154ecc179a44f266fcf69f343b30
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/28060#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F28060
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%2F28060
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/28060
Reloadhttps://github.com/nodejs/node/issues/28060
Reloadhttps://github.com/nodejs/node/issues/28060
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)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/28060
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/28060
esm modules documentation doesn't describe how to implement a modulehttps://github.com/nodejs/node/issues/28060#top
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
esmIssues and PRs related to the ECMAScript Modules implementation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22esm%22
https://github.com/sam-github
sam-githubhttps://github.com/sam-github
on Jun 4, 2019https://github.com/nodejs/node/issues/28060#issue-452120222
https://nodejs.org/api/esm.htmlhttps://nodejs.org/api/esm.html
sam-githubhttps://github.com/sam-github
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
esmIssues and PRs related to the ECMAScript Modules implementation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22esm%22
on Jun 4, 2019https://github.com/nodejs/node/issues/28060#event-2388919097
https://github.com/sam-github
sam-githubhttps://github.com/sam-github
on Jun 4, 2019https://github.com/nodejs/node/issues/28060#issuecomment-498769084
https://github.com/karthikPullela
karthikPullelahttps://github.com/karthikPullela
on Jun 18, 2019https://github.com/nodejs/node/issues/28060#issuecomment-502920965
https://github.com/GeoffreyBooth
GeoffreyBoothhttps://github.com/GeoffreyBooth
on Nov 22, 2019https://github.com/nodejs/node/issues/28060#issuecomment-557407886
https://nodejs.org/api/esm.html#esm_writing_dual_packages_while_avoiding_or_minimizing_hazardshttps://nodejs.org/api/esm.html#esm_writing_dual_packages_while_avoiding_or_minimizing_hazards
https://nodejs.org/api/esm.html#esm_code_import_code_specifiershttps://nodejs.org/api/esm.html#esm_code_import_code_specifiers
https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/exporthttps://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export
rosaxxnyhttps://github.com/rosaxxny
on Apr 30, 2020https://github.com/nodejs/node/issues/28060#event-3290366920
doc: add examples for implementing ESMhttps://github.com/rosaxxny/node/commit/bf5dd8cb0cb0059807b4d18e037b2326e02c22ae
bf5dd8chttps://github.com/rosaxxny/node/commit/bf5dd8cb0cb0059807b4d18e037b2326e02c22ae
addaleaxhttps://github.com/addaleax
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
4780493https://github.com/nodejs/node/commit/47804933012841f2dc90626bdcc161adf34569a5
on May 14, 2020https://github.com/nodejs/node/issues/28060#event-3337780790
codebyterehttps://github.com/codebytere
on May 16, 2020https://github.com/nodejs/node/issues/28060#event-3343880984
doc: add examples for implementing ESMhttps://github.com/nodejs/node/commit/0ffa0402a5dfe313fd6a3d683c9e3d1a50142938
0ffa040https://github.com/nodejs/node/commit/0ffa0402a5dfe313fd6a3d683c9e3d1a50142938
codebyterehttps://github.com/codebytere
on Jun 7, 2020https://github.com/nodejs/node/issues/28060#event-3416902915
doc: add examples for implementing ESMhttps://github.com/nodejs/node/commit/02a37c5b33e17c692079217eaa93bcded4669f0e
02a37c5https://github.com/nodejs/node/commit/02a37c5b33e17c692079217eaa93bcded4669f0e
doc: add examples for implementing ESMhttps://github.com/codebytere/node/commit/3d8ba292e267d49dcd36148fd1e52f9833686f2c
3d8ba29https://github.com/codebytere/node/commit/3d8ba292e267d49dcd36148fd1e52f9833686f2c
sjarmakhttps://github.com/sjarmak
on Jul 27, 2026https://github.com/nodejs/node/issues/28060#event-28561492535
doc: add examples for implementing ESMhttps://github.com/sg-evals/nodejs-node/commit/47804933012841f2dc90626bdcc161adf34569a5
4780493https://github.com/sg-evals/nodejs-node/commit/47804933012841f2dc90626bdcc161adf34569a5
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/28060
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/28060
docIssues and PRs related to Node.js documentation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22doc%22
esmIssues and PRs related to the ECMAScript Modules implementation.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22esm%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.