Commit c10ee5d
esm: better error message for unsupported URL
The default ESM loader supports only file and data URLs.
This PR adds better error message for it.
PR-URL: #31129
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>1 parent b95bb38 commit c10ee5dCopy full SHA for c10ee5d
File tree
Expand file treeCollapse file tree
4 files changed
+21
-10
lines changedOpen diff view settings
Filter options
- doc/api
- lib/internal
- modules/esm
- test/es-module
Expand file treeCollapse file tree
4 files changed
+21
-10
lines changedOpen diff view settings
Collapse file
+5Lines changed: 5 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1936 | 1936 | |
1937 | 1937 | |
1938 | 1938 | |
| 1939 | + |
| 1940 | + |
| 1941 | + |
| 1942 | + |
| 1943 | + |
1939 | 1944 | |
1940 | 1945 | |
1941 | 1946 | |
|
Collapse file
+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1218 | 1218 | |
1219 | 1219 | |
1220 | 1220 | |
| 1221 | + |
| 1222 | + |
1221 | 1223 | |
1222 | 1224 | |
1223 | 1225 | |
|
Collapse file
lib/internal/modules/esm/default_resolve.js
Copy file name to clipboardExpand all lines: lib/internal/modules/esm/default_resolve.js+6-2Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
| 20 | + |
| 21 | + |
21 | 22 | |
22 | 23 | |
23 | 24 | |
| ||
50 | 51 | |
51 | 52 | |
52 | 53 | |
| 54 | + |
53 | 55 | |
54 | | - |
| 56 | + |
55 | 57 | |
56 | 58 | |
57 | 59 | |
| ||
66 | 68 | |
67 | 69 | |
68 | 70 | |
| 71 | + |
| 72 | + |
69 | 73 | |
70 | 74 | |
71 | 75 | |
|
Collapse file
test/es-module/test-esm-dynamic-import.js
Copy file name to clipboardExpand all lines: test/es-module/test-esm-dynamic-import.js+8-8Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
20 | | - |
21 | | - |
| 20 | + |
| 21 | + |
22 | 22 | |
23 | 23 | |
24 | 24 | |
| ||
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
64 | 64 | |
0 commit comments