DEV Community

Omar Dulaimi
Omar Dulaimi

Posted on

Prefix-only modules in Nodejs 18

Nodejs 18 comes with the 𝗻𝗼𝗱𝗲: prefix to import modules from the core modules.
Conventional modules like π—³π˜€ and π—Όπ˜€, for example, would work as usual without the prefix. Though a new core module has emerged, where using the 𝗻𝗼𝗱𝗲: prefix is mandatory.

This prefix allows the node team to release new core modules without any name conflicts with existing modules in the community.

It works with all core node modules, so using it with userland imports won't work.

The 𝗻𝗼𝗱𝗲:π˜π—²π˜€π˜ module is still experimental, so there might be some changes coming its way, including the name.

prefix-only nodejs modules

Original post: https://www.linkedin.com/posts/activity-6938930546290909184-yd-b

Top comments (0)