From 01ac2e0fcaccaf469992f93a0e8bf04e61cf850e Mon Sep 17 00:00:00 2001 From: Charles Killer Date: Wed, 3 Aug 2022 11:25:53 +0100 Subject: [PATCH] docs: add baseUrl to example tsconfig (#7884) tsconfig requires compiler options with base url Without base url, TS errors appear such as `Cannot find module '@site/src/components/...` --- website/docs/typescript-support.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/docs/typescript-support.md b/website/docs/typescript-support.md index c8d7c117c6..ee49412882 100644 --- a/website/docs/typescript-support.md +++ b/website/docs/typescript-support.md @@ -28,7 +28,10 @@ Then add `tsconfig.json` to your project root with the following content: ```json title="tsconfig.json" { - "extends": "@tsconfig/docusaurus/tsconfig.json" + "extends": "@tsconfig/docusaurus/tsconfig.json", + "compilerOptions": { + "baseUrl": "." + } } ```