Skip to content

Commit 01ac2e0

Browse files
authored
docs: add baseUrl to example tsconfig (facebook#7884)
tsconfig requires compiler options with base url Without base url, TS errors appear such as `Cannot find module '@site/src/components/...`
1 parent 7ab2bd3 commit 01ac2e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

website/docs/typescript-support.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ Then add `tsconfig.json` to your project root with the following content:
2828

2929
```json title="tsconfig.json"
3030
{
31-
"extends": "@tsconfig/docusaurus/tsconfig.json"
31+
"extends": "@tsconfig/docusaurus/tsconfig.json",
32+
"compilerOptions": {
33+
"baseUrl": "."
34+
}
3235
}
3336
```
3437

0 commit comments

Comments
 (0)