mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-31 15:29:32 +02:00
docs: add "TypeScript support" section in the "Modules using Sass/SCSS" section (#9807)
Co-authored-by: sebastien <lorber.sebastien@gmail.com>
This commit is contained in:
parent
09b2005759
commit
436e20a42a
1 changed files with 14 additions and 0 deletions
|
@ -297,3 +297,17 @@ function MyComponent() {
|
|||
);
|
||||
}
|
||||
```
|
||||
|
||||
#### TypeScript support
|
||||
|
||||
To enable TypeScript support for Sass/SCSS modules, the TypeScript configuration should be updated to add the `docusaurus-plugin-sass` type definitions. This can be done in the `tsconfig.json` file:
|
||||
|
||||
```diff
|
||||
{
|
||||
"extends": "@tsconfig/docusaurus/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
...
|
||||
+ "types": ["docusaurus-plugin-sass"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue