Commit ac88f20
committed
fix(no-missing-import): Support data imports
Imported prefixed with 'data:' are not modules to be resolved, but the
direct data that should be imported (e.g., JavaScript code, JSON or
WASM).
This PR adds support for such imports in the no-missing-import rule.
Note:
With this change, the rule doesn't attempt to parse the data being
imported, it merely does not try to resolve it to a path (which would
fail), and thus allows those imports in the user's code.
Fixes #4641 parent 047d914 commit ac88f20
File tree
2 files changed
+16
-2
lines changed- lib/util
- tests/lib/rules
2 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
| |||
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
245 | | - | |
| 249 | + | |
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
| |||
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
352 | 360 | | |
353 | 361 | | |
354 | 362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
369 | 375 | | |
370 | 376 | | |
371 | 377 | | |
| |||
0 commit comments