Skip to content

Commit

Permalink
Update options.md (#1768)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed May 21, 2022
1 parent 78d103f commit cc0ca8b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions website/docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,12 @@ Disable top-level await in REPL. Equivalent to node's [`--no-experimental-repl-

Enable experimental hooks that re-map imports and require calls to support:

* resolves `.js` to `.ts`, so that `import "./foo.js"` will execute `foo.ts`
* resolves `.cjs` to `.cts`
* resolves `.mjs` to `.mts`
* allows including file extensions in CommonJS, for consistency with ESM where this is often mandatory
* remapping extensions, e.g. so that `import "./foo.js"` will execute `foo.ts`. Currently the following extensions will be mapped:
* `.js` to `.ts`, `.tsx`, or `.jsx`
* `.cjs` to `.cts`
* `.mjs` to `.mts`
* `.jsx` to `.tsx`
* including file extensions in CommonJS, for consistency with ESM where this is often mandatory

In the future, this hook will also support:

Expand Down

0 comments on commit cc0ca8b

Please sign in to comment.