From 436e20a42ab20afd7b6e3f6fa58ca82a2c5edf39 Mon Sep 17 00:00:00 2001 From: Alberto Vilches Date: Thu, 1 Feb 2024 12:03:53 +0100 Subject: [PATCH] docs: add "TypeScript support" section in the "Modules using Sass/SCSS" section (#9807) Co-authored-by: sebastien --- website/docs/styling-layout.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/website/docs/styling-layout.mdx b/website/docs/styling-layout.mdx index b4b296dc62..e505e5b66e 100644 --- a/website/docs/styling-layout.mdx +++ b/website/docs/styling-layout.mdx @@ -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"] + } +} +```