You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only the CLI argument for the main entry point to the program can be an entry point into an ESM graph. In the future `import()` can be used to create entry points into ESM graphs at run time.
35
+
Only the CLI argument for the main entry point to the program can be an entry
36
+
point into an ESM graph. In the future `import()` can be used to create entry
37
+
points into ESM graphs at run time.
32
38
33
39
### Unsupported
34
40
@@ -43,21 +49,26 @@ Only the CLI argument for the main entry point to the program can be an entry po
43
49
44
50
### No NODE_PATH
45
51
46
-
`NODE_PATH` is not part of resolving `import` specifiers. Please use symlinks if this behavior is desired.
52
+
`NODE_PATH` is not part of resolving `import` specifiers. Please use symlinks
53
+
if this behavior is desired.
47
54
48
55
### No `require.extensions`
49
56
50
-
`require.extensions` is not used by `import`. The expectation is that loader hooks can provide this workflow in the future.
57
+
`require.extensions` is not used by `import`. The expectation is that loader
58
+
hooks can provide this workflow in the future.
51
59
52
60
### No `require.cache`
53
61
54
62
`require.cache` is not used by `import`. It has a separate cache.
55
63
56
64
### URL based paths
57
65
58
-
ESM are resolved and cached based upon [URL](url.spec.whatwg.org) semantics. This means that files containing special characters such as `#` and `?` need to be escaped.
66
+
ESM are resolved and cached based upon [URL](https://url.spec.whatwg.org/)
67
+
semantics. This means that files containing special characters such as `#` and
68
+
`?` need to be escaped.
59
69
60
-
Modules will be loaded multiple times if the `import` specifier used to resolve them have a different query or fragment.
70
+
Modules will be loaded multiple times if the `import` specifier used to resolve
71
+
them have a different query or fragment.
61
72
62
73
```js
63
74
import'./foo?query=1'; // loads ./foo with query of "?query=1"
@@ -70,9 +81,11 @@ For now, only modules using the `file:` protocol can be loaded.
70
81
71
82
All CommonJS, JSON, and C++ modules can be used with `import`.
72
83
73
-
Modules loaded this way will only be loaded once, even if their query or fragment string differs between `import` statements.
84
+
Modules loaded this way will only be loaded once, even if their query
85
+
or fragment string differs between `import` statements.
74
86
75
-
When loaded via `import` these modules will provide a single `default` export representing the value of `module.exports` at the time they finished evaluating.
87
+
When loaded via `import` these modules will provide a single `default` export
88
+
representing the value of `module.exports` at the time they finished evaluating.
0 commit comments