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 @@ -105,13 +105,27 @@ There are four types of specifiers:
105
105
Bare specifiers, and the bare specifier portion of deep import specifiers, are
106
106
strings; but everything else in a specifier is a URL.
107
107
108
- Only ` file: ` and ` data: ` URLs are supported. A specifier like
108
+ ` file: ` , ` node: ` , and ` data: ` URLs are supported. A specifier like
109
109
` 'https://example.com/app.js' ` may be supported by browsers but it is not
110
110
supported in Node.js.
111
111
112
112
Specifiers may not begin with ` / ` or ` // ` . These are reserved for potential
113
113
future use. The root of the current volume may be referenced via ` file:/// ` .
114
114
115
+ #### ` node: ` Imports
116
+
117
+ <!-- YAML
118
+ added: REPLACEME
119
+ -->
120
+
121
+ ` node: ` URLs are supported as a means to load Node.js builtin modules. This
122
+ URL scheme allows for builtin modules to be referenced by valid absolute URL
123
+ strings.
124
+
125
+ ``` js
126
+ import fs from ' node:fs/promises' ;
127
+ ```
128
+
115
129
#### ` data: ` Imports
116
130
117
131
<!-- YAML
You can’t perform that action at this time.
0 commit comments