File tree 1 file changed +15
-1
lines changed
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:
125
125
Bare specifiers, and the bare specifier portion of deep import specifiers, are
126
126
strings; but everything else in a specifier is a URL.
127
127
128
- Only ` file: ` and ` data: ` URLs are supported. A specifier like
128
+ ` file: ` , ` node: ` , and ` data: ` URLs are supported. A specifier like
129
129
` 'https://example.com/app.js' ` may be supported by browsers but it is not
130
130
supported in Node.js.
131
131
132
132
Specifiers may not begin with ` / ` or ` // ` . These are reserved for potential
133
133
future use. The root of the current volume may be referenced via ` file:/// ` .
134
134
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
+
135
149
#### ` data: ` Imports
136
150
137
151
<!-- YAML
You can’t perform that action at this time.
0 commit comments