Closed
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.