mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
feat: create official TypeScript base config @docusaurus/tsconfig (#9050)
This commit is contained in:
parent
6102a5a671
commit
012b285805
13 changed files with 63 additions and 18 deletions
|
@ -21,14 +21,14 @@ Below are some guides on how to migrate an existing project to TypeScript.
|
|||
To start using TypeScript, add `@docusaurus/module-type-aliases` and the base TS config to your project:
|
||||
|
||||
```bash npm2yarn
|
||||
npm install --save-dev typescript @docusaurus/module-type-aliases @tsconfig/docusaurus
|
||||
npm install --save-dev typescript @docusaurus/module-type-aliases @docusaurus/tsconfig
|
||||
```
|
||||
|
||||
Then add `tsconfig.json` to your project root with the following content:
|
||||
|
||||
```json title="tsconfig.json"
|
||||
{
|
||||
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||
"extends": "@docusaurus/tsconfig",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "."
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue