Skip to content

Commit

Permalink
docs: update docs on tsconfig flags
Browse files Browse the repository at this point in the history
Fixes #1988
  • Loading branch information
davidjgoss committed Apr 6, 2022
1 parent c97252d commit fe24fbf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/transpiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ This would mean any support code loaded with the `require` option would be trans

## TypeScript

Your `tsconfig.json` should have the `resolveJsonModule` compiler option switched on. Other than that, a pretty standard TypeScript setup should work as expected.
Your `tsconfig.json` should have these `compilerOptions` on:

```json
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
```

Other than that, a pretty standard TypeScript setup should work as expected.

> ⚠️ Some TypeScript setups use `esnext` modules by default,
> which doesn't marry well with Node. You may consider using commonjs instead.
Expand Down

0 comments on commit fe24fbf

Please sign in to comment.