Skip to content

Support for "node:" protocol for importing builtin nodejs modules #369

Description

@mortynex

Is your feature request related to a problem? Please describe:
Many libraries make use of this feature, so not supporting would result in not being able to use these libraries.

Describe the solution you'd like:
Add the support for the protocol 😄

Describe alternatives you've considered:

Additional context:

node: is a protocol/prefix for importing a module to make clear that its node.js builtin module

example:

import fs from "node:fs/promises"
// or
const fs = require("node:fs/promises")

this feature was first introduced in node.js release v14.17.6, PR #37246

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions