Conversation
Adding info about some terms that aren't explained anywhere in this intro tutorial page. Feel free to modify as desired--I just want this page to explain what CJS, ESM, and .mjs mean before using those terms. Signed-off-by: Jed Hartman <logos-github@kith.org>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
| ## An Example Node.js Application | ||
|
|
||
| The most common example Hello World of Node.js is a web server: | ||
| The most common example Hello World of Node.js is a web server. You can choose between two versions of this example: one using the CommonJS (CJS) module system, using the filename extension `.js` or `.cjs`, and another using the ES Modules (ESM) system, using the filename extension `.mjs`. For more information, see [Understanding MJS and CJS](https://rgbstudios.org/blog/modules-explained-mjs-cjs). |
There was a problem hiding this comment.
Thanks for the contribution. I'd prefer if we linked to Node.js documentation (maybe something like https://nodejs.org/api/esm.html#modules-ecmascript-modules ) or MDN for explanations of the module systems
There was a problem hiding this comment.
Additionally, .js can be both ESM or CJS
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8518 +/- ##
==========================================
+ Coverage 74.70% 74.72% +0.01%
==========================================
Files 102 102
Lines 8956 8956
Branches 305 305
==========================================
+ Hits 6691 6692 +1
+ Misses 2263 2262 -1
Partials 2 2 ☔ View full report in Codecov by Sentry. |
Adding info about some terms that aren't explained anywhere in this intro tutorial page. Feel free to modify as desired--I just want this page to explain what CJS, ESM, and .mjs mean before using those terms.
Description
Adding info about some terms that aren't explained anywhere in this intro tutorial page.
Validation
Just adding some text.
Related Issues
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.