-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
The node:
protocol has many benefits:
- Makes it perfectly clear that the import is a Node.js builtin module. (Beginners don't always realize this)
- Makes the import identifier a valid absolute URL.
- Avoids conflicts for future Node.js builtin modules.
However, most people don't know about the node:
protocol. I suggest Node.js makes it the recommended way of importing builtin modules by using it in all the examples in the documentation. A lot of people are starting to move to ESM, so now would be a good time for people to switch to the node:
protocol too.
Personally, I plan to switch all my packages to use the node:
protocol. We have also made an ESLint rule for it.
fisker, mdboop, agucova, privatenumber, SvanBoxel and 210 moreaquaswim, markcarroll, MadProbe, radum and darovicqodunpob and liuliangsirSvanBoxel, satya164, szmarczak, sesam, bmealhouse and 15 morecjihrig, tonkotsuboy, matt-morris, einSelbst, sergiodxa-silverback and 5 morethescientist13, liuliangsir and jaydenseric
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.