File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,27 @@ There are four types of specifiers:
125125Bare specifiers, and the bare specifier portion of deep import specifiers, are
126126strings; but everything else in a specifier is a URL.
127127
128- Only ` file: ` and ` data: ` URLs are supported. A specifier like
128+ ` file: ` , ` node: ` , and ` data: ` URLs are supported. A specifier like
129129` 'https://example.com/app.js' ` may be supported by browsers but it is not
130130supported in Node.js.
131131
132132Specifiers may not begin with ` / ` or ` // ` . These are reserved for potential
133133future use. The root of the current volume may be referenced via ` file:/// ` .
134134
135+ #### ` node: ` Imports
136+
137+ <!-- YAML
138+ added: REPLACEME
139+ -->
140+
141+ ` node: ` URLs are supported as a means to load Node.js builtin modules. This
142+ URL scheme allows for builtin modules to be referenced by valid absolute URL
143+ strings.
144+
145+ ``` js
146+ import fs from ' node:fs/promises' ;
147+ ```
148+
135149#### ` data: ` Imports
136150
137151<!-- YAML
You can’t perform that action at this time.
0 commit comments