mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibJS: Infer file extensions when resolving module paths
This allows `import "./foo"` to succeed, even if the file is actually called `foo.js`. IDEs commonly exclude file extensions in auto-imports. Closes #14364.
This commit is contained in:
parent
2b3dd87296
commit
93b4c3bb82
3 changed files with 42 additions and 6 deletions
|
@ -0,0 +1,5 @@
|
|||
// If all of these succeed, path resolution with implicit extensions is working.
|
||||
|
||||
import "./module-with-default";
|
||||
import "./submodule";
|
||||
import "./json-module" assert { type: "json" };
|
Loading…
Add table
Add a link
Reference in a new issue