diff options
author | 2023-09-29 13:13:52 +0800 | |
---|---|---|
committer | 2023-09-28 22:13:52 -0700 | |
commit | 315125c43adced310b02e9606b55338ca31b161a (patch) | |
tree | 72573c3362f0dd4f1d8171d8aa7bd157c2989673 | |
parent | f6fbf869105f7580d408c1802b6fd91148f5a887 (diff) | |
download | bun-315125c43adced310b02e9606b55338ca31b161a.tar.gz bun-315125c43adced310b02e9606b55338ca31b161a.tar.zst bun-315125c43adced310b02e9606b55338ca31b161a.zip |
docs (runtime): the order of checking files when using bare impoort (#5919)
-rw-r--r-- | docs/runtime/modules.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/runtime/modules.md b/docs/runtime/modules.md index cfda31e3b..486ddea5f 100644 --- a/docs/runtime/modules.md +++ b/docs/runtime/modules.md @@ -33,15 +33,20 @@ Hello world! In this case, we are importing from `./hello`, a relative path with no extension. **Extensioned imports are optional but supported.** To resolve this import, Bun will check for the following files in order: -- `./hello.ts` - `./hello.tsx` -- `./hello.js` +- `./hello.jsx` +- `./hello.ts` - `./hello.mjs` +- `./hello.js` - `./hello.cjs` +- `./hello.json` +- `./hello/index.tsx` +- `./hello/index.jsx` - `./hello/index.ts` +- `./hello/index.mjs` - `./hello/index.js` +- `./hello/index.cjs` - `./hello/index.json` -- `./hello/index.mjs` Import paths are case-insensitive, meaning these are all valid imports: |