From 4a0273fab294ba7cafe5014a2af502ce98097380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 26 Mar 2026 15:34:39 +0100 Subject: [PATCH 1/5] fix(create-docusaurus): fix support for TypeScript 6.0 + fix our CI (#11843) --- .github/workflows/tests-e2e.yml | 10 +++++ .github/workflows/tests-windows.yml | 17 ++++++--- .github/workflows/tests.yml | 8 ++++ package.json | 4 +- .../templates/classic-typescript/package.json | 2 +- .../classic-typescript/tsconfig.json | 1 + packages/docusaurus-logger/src/perfLogger.ts | 4 +- .../tsconfig.client.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.client.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.client.json | 3 ++ .../tsconfig.worker.json | 3 +- packages/docusaurus/package.json | 1 + .../docusaurus/src/client/clientEntry.tsx | 6 --- packages/docusaurus/src/client/docusaurus.ts | 3 +- .../src/client/exports/ComponentCreator.tsx | 6 --- packages/docusaurus/src/server/i18n.ts | 3 +- packages/docusaurus/tsconfig.client.json | 5 ++- tsconfig.base.client.json | 4 +- tsconfig.base.json | 1 + website/tsconfig.json | 1 + yarn.lock | 38 +++++++++---------- 23 files changed, 75 insertions(+), 53 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 1ae61a878c01..dbd9012baf5c 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -158,18 +158,28 @@ jobs: working-directory: ../test-website env: E2E_TEST: true + - name: TypeCheck website # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: yarn typecheck + - name: TypeCheck website - min version - v5.1 # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' working-directory: ../test-website run: | yarn add typescript@5.1.6 --exact + + # Downgrade TS ignoreDeprecations option + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" + yarn typecheck + + # Restore TS ignoreDeprecations option + node -e "const fs = require('fs'); const f = 'tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" + - name: TypeCheck website - max version - Latest # TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later. if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp' diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 69d7a8b7f523..e766abd9cb78 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -61,18 +61,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + + - name: TypeCheck website - max version - Latest + # For latest TS there are often lib check errors, so we disable it + # Details: https://github.com/facebook/docusaurus/pull/10486 + run: | + yarn add typescript@latest --exact -D -W --ignore-scripts + yarn workspace website typecheck --project tsconfig.skipLibCheck.json + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + node -e 'const fs = require("fs"); const f = "website/tsconfig.json"; fs.writeFileSync(f, fs.readFileSync(f, "utf8").replace(/"ignoreDeprecations"\s*:\s*"6\.0"/, "\"ignoreDeprecations\": \"5.0\""));' + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -Force package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck - - name: TypeCheck website - max version - Latest - # For latest TS there are often lib check errors, so we disable it - # Details: https://github.com/facebook/docusaurus/pull/10486 - run: | - yarn add typescript@latest --exact -D -W --ignore-scripts - yarn workspace website typecheck --project tsconfig.skipLibCheck.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 816fcee7b2b2..05e3f3c173f9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,15 +58,23 @@ jobs: - name: TypeCheck website # see https://github.com/facebook/docusaurus/pull/10486 run: yarn workspace website typecheck + - name: TypeCheck website - min version - v5.1 run: | yarn add typescript@5.1.6 --exact -D -W --ignore-scripts + # Downgrade TS ignoreDeprecations option + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"6.0\"', '\"ignoreDeprecations\": \"5.0\"'))" + # DocSearch@4/ai@5 doesn't support TS 5.1 (with skipLibCheck=false) jq '.resolutions."@docsearch/react" = "^3.9.0"' package.json > package.json.tmp && mv -f package.json.tmp package.json yarn add @docsearch/react@^3.9.0 --exact -D -W --ignore-scripts yarn workspace website typecheck + + # Restore TS ignoreDeprecations option + node -e "const fs = require('fs'); const f = 'website/tsconfig.json'; fs.writeFileSync(f, fs.readFileSync(f,'utf8').replace('\"ignoreDeprecations\": \"5.0\"', '\"ignoreDeprecations\": \"6.0\"'))" + - name: TypeCheck website - max version - Latest # For latest TS there are often lib check errors, so we disable it # Details: https://github.com/facebook/docusaurus/pull/10486 diff --git a/package.json b/package.json index 885b9fc25850..90f0fa334570 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^30.0.0", "@types/lodash": "^4.14.197", - "@types/node": "^18.16.19", + "@types/node": "^20.19.37", "@types/prompts": "^2.4.4", "@types/react": "^19.2.10", "@types/semver": "^7.5.0", @@ -128,7 +128,7 @@ "stylelint": "^14.16.1", "stylelint-config-prettier": "^9.0.5", "stylelint-config-standard": "^29.0.0", - "typescript": "~5.8.2" + "typescript": "~6.0.2" }, "resolutions": { "**/pretty-format/react-is": "^19.2.4" diff --git a/packages/create-docusaurus/templates/classic-typescript/package.json b/packages/create-docusaurus/templates/classic-typescript/package.json index aa4d545ffeae..cc9ed3d5b874 100644 --- a/packages/create-docusaurus/templates/classic-typescript/package.json +++ b/packages/create-docusaurus/templates/classic-typescript/package.json @@ -29,7 +29,7 @@ "@docusaurus/tsconfig": "3.9.2", "@docusaurus/types": "3.9.2", "@types/react": "^19.0.0", - "typescript": "~5.6.2" + "typescript": "~6.0.2" }, "browserslist": { "production": [ diff --git a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json index aceae0dd36e4..405d777064cb 100644 --- a/packages/create-docusaurus/templates/classic-typescript/tsconfig.json +++ b/packages/create-docusaurus/templates/classic-typescript/tsconfig.json @@ -5,6 +5,7 @@ "extends": "@docusaurus/tsconfig", "compilerOptions": { "baseUrl": ".", + "ignoreDeprecations": "6.0", "strict": true }, "exclude": [".docusaurus", "build"] diff --git a/packages/docusaurus-logger/src/perfLogger.ts b/packages/docusaurus-logger/src/perfLogger.ts index 2bc94b7730e0..e5e5823afc70 100644 --- a/packages/docusaurus-logger/src/perfLogger.ts +++ b/packages/docusaurus-logger/src/perfLogger.ts @@ -4,7 +4,9 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -import {AsyncLocalStorage} from 'async_hooks'; + +import {AsyncLocalStorage} from 'node:async_hooks'; +import {type PerformanceMark} from 'node:perf_hooks'; import logger from './logger'; // For now this is a private env variable we use internally diff --git a/packages/docusaurus-plugin-content-blog/tsconfig.client.json b/packages/docusaurus-plugin-content-blog/tsconfig.client.json index be1294f32d10..ad1fa888de1e 100644 --- a/packages/docusaurus-plugin-content-blog/tsconfig.client.json +++ b/packages/docusaurus-plugin-content-blog/tsconfig.client.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-content-blog/tsconfig.json b/packages/docusaurus-plugin-content-blog/tsconfig.json index 8cec50ee1327..60dfa46f1b9f 100644 --- a/packages/docusaurus-plugin-content-blog/tsconfig.json +++ b/packages/docusaurus-plugin-content-blog/tsconfig.json @@ -5,5 +5,5 @@ "noEmit": false }, "include": ["src"], - "exclude": ["src/client", "**/__tests__/**"] + "exclude": ["src/client", "**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.client.json b/packages/docusaurus-plugin-content-docs/tsconfig.client.json index be1294f32d10..ad1fa888de1e 100644 --- a/packages/docusaurus-plugin-content-docs/tsconfig.client.json +++ b/packages/docusaurus-plugin-content-docs/tsconfig.client.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-content-docs/tsconfig.json b/packages/docusaurus-plugin-content-docs/tsconfig.json index 8cec50ee1327..60dfa46f1b9f 100644 --- a/packages/docusaurus-plugin-content-docs/tsconfig.json +++ b/packages/docusaurus-plugin-content-docs/tsconfig.json @@ -5,5 +5,5 @@ "noEmit": false }, "include": ["src"], - "exclude": ["src/client", "**/__tests__/**"] + "exclude": ["src/client", "**/__tests__/**", "**/*.test.ts"] } diff --git a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json index 55a83c9a16f4..8ce90029c715 100644 --- a/packages/docusaurus-plugin-google-gtag/tsconfig.client.json +++ b/packages/docusaurus-plugin-google-gtag/tsconfig.client.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.client.json", + "compilerOptions": { + "types": ["gtag.js"] + }, "include": ["src/gtag.ts", "src/*.d.ts"], "exclude": ["**/__tests__/**"] } diff --git a/packages/docusaurus-plugin-pwa/tsconfig.worker.json b/packages/docusaurus-plugin-pwa/tsconfig.worker.json index d649d9cfe6d7..7270da1d425e 100644 --- a/packages/docusaurus-plugin-pwa/tsconfig.worker.json +++ b/packages/docusaurus-plugin-pwa/tsconfig.worker.json @@ -6,8 +6,7 @@ "tsBuildInfoFile": "lib/.tsbuildinfo-worker", "moduleResolution": "bundler", "module": "esnext", - "target": "esnext", - "types": ["node"] + "target": "esnext" }, "include": ["src/sw.ts"], "exclude": ["**/__tests__/**"] diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 4d683ccc7b7c..2f348c658485 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -86,6 +86,7 @@ "@types/serve-handler": "^6.1.4", "@types/update-notifier": "^6.0.4", "@types/webpack-bundle-analyzer": "^4.7.0", + "@types/webpack-env": "^1.18.8", "tmp-promise": "^3.0.3", "tree-node-cli": "^1.6.0" }, diff --git a/packages/docusaurus/src/client/clientEntry.tsx b/packages/docusaurus/src/client/clientEntry.tsx index eb2f67368a20..db521bb39f50 100644 --- a/packages/docusaurus/src/client/clientEntry.tsx +++ b/packages/docusaurus/src/client/clientEntry.tsx @@ -23,12 +23,6 @@ function Router({children}: {children: ReactNode}): ReactNode { ); } -declare global { - interface NodeModule { - hot?: {accept: () => void}; - } -} - const hydrate = Boolean(process.env.HYDRATE_CLIENT_ENTRY); // Client-side render (e.g: running in browser) to become single-page diff --git a/packages/docusaurus/src/client/docusaurus.ts b/packages/docusaurus/src/client/docusaurus.ts index 79bb4e21c779..24dff371728b 100644 --- a/packages/docusaurus/src/client/docusaurus.ts +++ b/packages/docusaurus/src/client/docusaurus.ts @@ -16,8 +16,7 @@ const fetched = new Set(); const loaded = new Set(); declare global { - // eslint-disable-next-line camelcase, no-underscore-dangle - const __webpack_require__: {gca: (name: string) => string}; + // See https://github.com/microsoft/TypeScript/issues/56962 interface Navigator { connection?: {effectiveType: string; saveData: boolean}; } diff --git a/packages/docusaurus/src/client/exports/ComponentCreator.tsx b/packages/docusaurus/src/client/exports/ComponentCreator.tsx index 48d6640385b7..b5e70812b594 100644 --- a/packages/docusaurus/src/client/exports/ComponentCreator.tsx +++ b/packages/docusaurus/src/client/exports/ComponentCreator.tsx @@ -14,12 +14,6 @@ import flat from '../flat'; import {RouteContextProvider} from '../routeContext'; import type {RouteContext} from '@docusaurus/types'; -declare global { - interface NodeRequire { - resolveWeak: (name: string) => number; - } -} - export default function ComponentCreator( path: string, hash: string, diff --git a/packages/docusaurus/src/server/i18n.ts b/packages/docusaurus/src/server/i18n.ts index 8a80f4e6486f..3b0dab396d9f 100644 --- a/packages/docusaurus/src/server/i18n.ts +++ b/packages/docusaurus/src/server/i18n.ts @@ -64,7 +64,6 @@ function getDefaultCalendar(localeStr: string) { // See https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getCalendars // See https://caniuse.com/mdn-javascript_builtins_intl_locale_getcalendars const calendars = - // @ts-expect-error: new std method (Bun/JSC/WebKit) locale.getCalendars?.() ?? // @ts-expect-error: non-std attribute (V8/Chromium/Node) locale.calendars; @@ -84,7 +83,7 @@ function getDefaultDirection(localeStr: string) { // TODO Docusaurus v4: remove the fallback to locale.textInfo // @ts-expect-error: The TC39 proposal was updated const textInto = locale.getTextInfo?.() ?? locale.textInfo; - return textInto.direction; + return textInto.direction ?? 'ltr'; } export function getDefaultLocaleConfig( diff --git a/packages/docusaurus/tsconfig.client.json b/packages/docusaurus/tsconfig.client.json index be1294f32d10..e9f8e88e5fd9 100644 --- a/packages/docusaurus/tsconfig.client.json +++ b/packages/docusaurus/tsconfig.client.json @@ -1,5 +1,8 @@ { "extends": "../../tsconfig.base.client.json", "include": ["src/client", "src/*.d.ts"], - "exclude": ["**/__tests__/**"] + "exclude": ["**/__tests__/**"], + "compilerOptions": { + "types": ["node", "webpack-env"] + } } diff --git a/tsconfig.base.client.json b/tsconfig.base.client.json index ae15d13c915e..bd02813b86a4 100644 --- a/tsconfig.base.client.json +++ b/tsconfig.base.client.json @@ -2,9 +2,11 @@ "extends": "./tsconfig.base.json", "compilerOptions": { "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo-client", + "lib": ["DOM", "ESNext"], "noEmit": false, "moduleResolution": "bundler", "module": "esnext", - "target": "esnext" + "target": "esnext", + "types": [] } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 247a84af9df5..43b39e34593a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -6,6 +6,7 @@ "incremental": true, "tsBuildInfoFile": "${configDir}/lib/.tsbuildinfo", "erasableSyntaxOnly": true, + "types": ["node"], /* Emit */ "target": "ES2020", "lib": ["ESNext"], diff --git a/website/tsconfig.json b/website/tsconfig.json index caea2e3443e5..22c38a19eb6c 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -4,6 +4,7 @@ "compilerOptions": { "lib": ["DOM", "ESNext"], "baseUrl": ".", + "ignoreDeprecations": "6.0", "resolveJsonModule": true, "allowArbitraryExtensions": true, diff --git a/yarn.lock b/yarn.lock index 769b4e0691bf..c39ff43d5bc5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4587,12 +4587,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== -"@types/node@^18.16.19": - version "18.19.59" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.59.tgz#2de1b95b0b468089b616b2feb809755d70a74949" - integrity sha512-vizm2EqwV/7Zay+A6J3tGl9Lhr7CjZe2HmWS988sefiEmsyP9CeXEleho6i4hJk/8UtZAo0bWN4QPZZr83RxvQ== +"@types/node@^20.19.37": + version "20.19.37" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.37.tgz#b4fb4033408dd97becce63ec932c9ec57a9e2919" + integrity sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw== dependencies: - undici-types "~5.26.4" + undici-types "~6.21.0" "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -4826,6 +4826,11 @@ tapable "^2.2.0" webpack "^5" +"@types/webpack-env@^1.18.8": + version "1.18.8" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.18.8.tgz#71f083718c094204d7b64443701d32f1db3989e3" + integrity sha512-G9eAoJRMLjcvN4I08wB5I7YofOb/kaJNd5uoCMX+LbKXTPCF+ZIHuqTnFaK9Jz1rgs035f9JUPUhNFtqgucy/A== + "@types/webpack-sources@*": version "3.2.3" resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-3.2.3.tgz#b667bd13e9fa15a9c26603dce502c7985418c3d8" @@ -17876,15 +17881,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== -typescript@~5.6.2: - version "5.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" - integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== - -typescript@~5.8.2: - version "5.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4" - integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ== +typescript@~6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.2.tgz#0b1bfb15f68c64b97032f3d78abbf98bdbba501f" + integrity sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ== ufo@^1.5.4: version "1.6.0" @@ -17906,16 +17906,16 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - undici-types@~6.19.2: version "6.19.8" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2" From 1a52592d730789cad2f888228c03d14132a7f0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 26 Mar 2026 15:49:59 +0100 Subject: [PATCH 2/5] fix(faster): upgrade Rspack, fix Yarn PnP support (#11817) * Try to fix Yarn PnP for Rspack * Try to fix Yarn PnP for Rspack * useless change * refactor: apply lint autofix * Rspack 1.7.10 --------- Co-authored-by: slorber <749374+slorber@users.noreply.github.com> --- packages/docusaurus-faster/package.json | 2 +- .../docusaurus/src/server/configValidation.ts | 20 --- yarn.lock | 138 +++++++++--------- 3 files changed, 70 insertions(+), 90 deletions(-) diff --git a/packages/docusaurus-faster/package.json b/packages/docusaurus-faster/package.json index 62b7365922ed..002dffe8fda6 100644 --- a/packages/docusaurus-faster/package.json +++ b/packages/docusaurus-faster/package.json @@ -19,7 +19,7 @@ "license": "MIT", "dependencies": { "@docusaurus/types": "3.9.2", - "@rspack/core": "^1.7.5", + "@rspack/core": "^1.7.10", "@swc/core": "^1.7.39", "@swc/html": "^1.13.5", "browserslist": "^4.24.2", diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index defc47589b7b..5558b509ca75 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -576,26 +576,6 @@ function postProcessDocusaurusConfig(config: DocusaurusConfig) { } } - // Docusaurus Faster doesn't fully support Yarn PnP :s - // Until we support Rspack + PnP, we simply revert to Webpack with a warning - // See https://github.com/facebook/docusaurus/issues/10787 - if (process.versions.pnp) { - if (config.future.faster.rspackBundler) { - logger.warn(`Docusaurus Faster doesn't fully support the Yarn PnP linker yet. -We recommend to use Yarn node-linker instead. -Docusaurus will still attempt to build your app with Webpack (instead of Rspack) and use slower minimizers. -See also https://github.com/facebook/docusaurus/issues/10787`); - config.future.faster.rspackBundler = false; - config.future.faster.rspackPersistentCache = false; - - // This also won't work due to Webpack libs using peerDependencies :s - // This could eventually work if the deps are added at the site level - // TODO Docusaurus v4 clean this up - config.future.faster.lightningCssMinimizer = false; - config.future.faster.swcJsMinimizer = false; - } - } - if (config.onBrokenMarkdownLinks) { logger.warn`The code=${'siteConfig.onBrokenMarkdownLinks'} config option is deprecated and will be removed in Docusaurus v4. Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBrokenMarkdownLinks'} instead.`; diff --git a/yarn.lock b/yarn.lock index c39ff43d5bc5..ae9589fd8f98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3401,81 +3401,81 @@ fs-extra "^11.1.1" lodash "^4.17.21" -"@rspack/binding-darwin-arm64@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.7.5.tgz#5adad9b17d4a29c62d239bfac653b71e7d755b61" - integrity sha512-dg2/IrF+g498NUt654N8LFWfIiUsHlTankWieE1S3GWEQM6jweeRbNuu1Py1nWIUsjR2yQtv7ziia7c9Q8UTaQ== - -"@rspack/binding-darwin-x64@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.5.tgz#bfa31b9bdcea5238babf0914289ad4227a4eabdb" - integrity sha512-RQJX4boQJUu3lo1yiN344+y8W6iSO08ARXIZqFPg66coOgfX1lhsXQSRJGQEQG4PAcYuC0GmrYFzErliifbc1Q== - -"@rspack/binding-linux-arm64-gnu@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.5.tgz#2f3705a444911602619f48c2aac7a92205b9de8a" - integrity sha512-R7CO1crkJQLIQpJQzf+6DMHjvcvH/VxsatS5CG897IIT2aAfBeQuQAO+ERJko/UwSZam2K8Rxjuopcu5A2jsTQ== - -"@rspack/binding-linux-arm64-musl@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.5.tgz#ac94268f78ffd818465a2ee1d626f5d349190f39" - integrity sha512-moDVFD06ISZi+wCIjJLzQSr8WO8paViacSHk+rOKQxwKI96cPoC4JFkz0+ibT2uks4i2ecs4Op48orsoguiXxw== - -"@rspack/binding-linux-x64-gnu@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.5.tgz#69414ac99b79240d0148331bfd6579c3c669b85e" - integrity sha512-LGtdsdhtA5IxdMptj2NDVEbuZF4aqM99BVn3saHp92A4Fn20mW9UtQ+19PtaOFdbQBUN1GcP+cosrJ1wY56hOg== - -"@rspack/binding-linux-x64-musl@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.5.tgz#a5b14a9a90e2400b85b2d13e83f379974356bd83" - integrity sha512-V1HTvuj0XF/e4Xnixqf7FrxdCtTkYqn26EKwH7ExUFuVBh4SsLGr29EK5SOXBG0xdy5TSEUokMup7cuONPb3Hw== - -"@rspack/binding-wasm32-wasi@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.5.tgz#4addba33fbc8ba100cf7c963e804c9659dd87618" - integrity sha512-rGNHrk2QuLFfwOTib91skuLh2aMYeTP4lgM4zanDhtt95DLDlwioETFY7FzY1WmS+Z3qnEyrgQIRp8osy0NKTw== +"@rspack/binding-darwin-arm64@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.7.10.tgz#6695cf6da39a2eb346723ec09d5b1f8586f64bd6" + integrity sha512-bsXi7I6TpH+a4L6okIUh1JDvwT+XcK/L7Yvhu5G2t5YYyd2fl5vMM5O9cePRpEb0RdqJZ3Z8i9WIWHap9aQ8Gw== + +"@rspack/binding-darwin-x64@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.10.tgz#8845d616ff8b091250a07e04798346c53cc5c764" + integrity sha512-h/kOGL1bUflDDYnbiUjaRE9kagJpour4FatGihueV03+cRGQ6jpde+BjUakqzMx65CeDbeYI6jAiPhElnlAtRw== + +"@rspack/binding-linux-arm64-gnu@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.10.tgz#43f339569715e75201ffa87412456a3ba260908d" + integrity sha512-Z4reus7UxGM4+JuhiIht8KuGP1KgM7nNhOlXUHcQCMswP/Rymj5oJQN3TDWgijFUZs09ULl8t3T+AQAVTd/WvA== + +"@rspack/binding-linux-arm64-musl@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.10.tgz#3c6a22a9d802f99706ff51daecae8ea974546270" + integrity sha512-LYaoVmWizG4oQ3g+St3eM5qxsyfH07kLirP7NJcDMgvu3eQ29MeyTZ3ugkgW6LvlmJue7eTQyf6CZlanoF5SSg== + +"@rspack/binding-linux-x64-gnu@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.10.tgz#822af2900cff8c907fab78d9cdf9004652b32c06" + integrity sha512-aIm2G4Kcm3qxDTNqKarK0oaLY2iXnCmpRQQhAcMlR0aS2LmxL89XzVeRr9GFA1MzGrAsZONWCLkxQvn3WUbm4Q== + +"@rspack/binding-linux-x64-musl@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.10.tgz#2a698c7984877df2e5f38ddda98983bffbe80c40" + integrity sha512-SIHQbAgB9IPH0H3H+i5rN5jo9yA/yTMq8b7XfRkTMvZ7P7MXxJ0dE8EJu3BmCLM19sqnTc2eX+SVfE8ZMDzghA== + +"@rspack/binding-wasm32-wasi@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.10.tgz#f906f5b21d8a25547a3d2212a98d078623bdb874" + integrity sha512-J9HDXHD1tj+9FmX4+K3CTkO7dCE2bootlR37YuC2Owc0Lwl1/i2oGT71KHnMqI9faF/hipAaQM5OywkiiuNB7w== dependencies: "@napi-rs/wasm-runtime" "1.0.7" -"@rspack/binding-win32-arm64-msvc@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.5.tgz#a2bac95fa670738dd2850bac0f56fc490a2b6aad" - integrity sha512-eLyD9URS9M2pYa7sPICu9S0OuDAMnnGfuqrZYlrtgnEOEgimaG39gX6ENLwHvlNulaVMMFTNbDnS/2MELZ7r7g== - -"@rspack/binding-win32-ia32-msvc@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.5.tgz#7256001750794aa3b14815cc460c43d621ac4bdb" - integrity sha512-ZT4eC8hHWzweA6S4Tl2c/z/fvhbU7Wnh+l76z+qmDy8wuA8uNrHgIb1mHLPli/wsqcjmIy8rDO9gkIBitg5I+w== - -"@rspack/binding-win32-x64-msvc@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.5.tgz#eb8bafd9011139478ce79bd4924e3c0e481a2faa" - integrity sha512-a2j10QS3dZvW+gdu+FXteAkChxsK2g9BRUOmpt13w22LkiGrdmOkMQyDWRgJNxUGJTlqIUqtXxs72nTTlzo2Sw== - -"@rspack/binding@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.7.5.tgz#33efebda1596936193a6a9a8cdfb289b03c4cbba" - integrity sha512-tlZfDHfGu765FBL3hIyjrr8slJZztv7rCM+KIczZS7UlJQDl1+WsDKUe/+E1Fw9SlmorLWK40+y3rLTHmMrN2A== +"@rspack/binding-win32-arm64-msvc@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.10.tgz#924a89455a4210fa5e6d404820d944e0838c9a72" + integrity sha512-FaQGSCXH89nMOYW0bVp0bKQDQbrOEFFm7yedla7g6mkWlFVQo5UyBxid5wJUCqGJBtJepRxeRfByWiaI5nVGvg== + +"@rspack/binding-win32-ia32-msvc@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.10.tgz#26d2ca0f0719d164bb563a09a68be5290b56ca18" + integrity sha512-/66TNLOeM4R5dHhRWRVbMTgWghgxz+32ym0c/zGGXQRoMbz7210EoL40ALUgdBdeeREO8LoV+Mn7v8/QZCwHzw== + +"@rspack/binding-win32-x64-msvc@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.10.tgz#98ed751af1f500f28d33b04201e457c4727d8b3c" + integrity sha512-SUa3v1W7PGFCy6AHRmDsm43/tkfaZFi1TN2oIk5aCdT9T51baDVBjAbehRDu9xFbK4piL3k7uqIVSIrKgVqk1g== + +"@rspack/binding@1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/binding/-/binding-1.7.10.tgz#fd20bafaa48541d803bbcba9cac5a680c63c0671" + integrity sha512-j+DPEaSJLRgasxXNpYQpvC7wUkQF5WoWPiTfm4fLczwlAmYwGSVkJiyWDrOlvVPiGGYiXIaXEjVWTw6fT6/vnA== optionalDependencies: - "@rspack/binding-darwin-arm64" "1.7.5" - "@rspack/binding-darwin-x64" "1.7.5" - "@rspack/binding-linux-arm64-gnu" "1.7.5" - "@rspack/binding-linux-arm64-musl" "1.7.5" - "@rspack/binding-linux-x64-gnu" "1.7.5" - "@rspack/binding-linux-x64-musl" "1.7.5" - "@rspack/binding-wasm32-wasi" "1.7.5" - "@rspack/binding-win32-arm64-msvc" "1.7.5" - "@rspack/binding-win32-ia32-msvc" "1.7.5" - "@rspack/binding-win32-x64-msvc" "1.7.5" - -"@rspack/core@^1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.7.5.tgz#d19295b5c2f137d4458701cf6dc3cbd3f73708b7" - integrity sha512-W1ChLhjBxGg6y4AHjEVjhcww/FZJ2O9obR0EOlYcfrfQGojCAUMeQjbmaF2sse5g5m0vSCaPtNYkycZ0qVRk1A== + "@rspack/binding-darwin-arm64" "1.7.10" + "@rspack/binding-darwin-x64" "1.7.10" + "@rspack/binding-linux-arm64-gnu" "1.7.10" + "@rspack/binding-linux-arm64-musl" "1.7.10" + "@rspack/binding-linux-x64-gnu" "1.7.10" + "@rspack/binding-linux-x64-musl" "1.7.10" + "@rspack/binding-wasm32-wasi" "1.7.10" + "@rspack/binding-win32-arm64-msvc" "1.7.10" + "@rspack/binding-win32-ia32-msvc" "1.7.10" + "@rspack/binding-win32-x64-msvc" "1.7.10" + +"@rspack/core@^1.7.10": + version "1.7.10" + resolved "https://registry.yarnpkg.com/@rspack/core/-/core-1.7.10.tgz#cb86011a730176e9067276af9688ce496af80216" + integrity sha512-dO7J0aHSa9Fg2kGT0+ZsM500lMdlNIyCHavIaz7dTDn6KXvFz1qbWQ/48x3OlNFw1mA0jxAjjw9e7h3sWQZUNg== dependencies: "@module-federation/runtime-tools" "0.22.0" - "@rspack/binding" "1.7.5" + "@rspack/binding" "1.7.10" "@rspack/lite-tapable" "1.1.0" "@rspack/lite-tapable@1.1.0": From 543eaeb9e43b611e0c25e23e735439c82477e355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 26 Mar 2026 17:41:00 +0100 Subject: [PATCH 3/5] fix(core): fix `url.resolve()` Node.js deprecation warning (#11844) --- packages/docusaurus/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 2f348c658485..82eef331f8a1 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -62,7 +62,7 @@ "prompts": "^2.4.2", "react-helmet-async": "npm:@slorber/react-helmet-async@1.3.0", "react-loadable": "npm:@docusaurus/react-loadable@6.0.0", - "react-loadable-ssr-addon-v5-slorber": "^1.0.1", + "react-loadable-ssr-addon-v5-slorber": "^1.0.3", "react-router": "^5.3.4", "react-router-config": "^5.1.1", "react-router-dom": "^5.3.4", diff --git a/yarn.lock b/yarn.lock index ae9589fd8f98..e79cb89f0307 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15508,10 +15508,10 @@ react-live@^4.1.6: sucrase "^3.31.0" use-editable "^2.3.3" -react-loadable-ssr-addon-v5-slorber@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz#2cdc91e8a744ffdf9e3556caabeb6e4278689883" - integrity sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A== +react-loadable-ssr-addon-v5-slorber@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.3.tgz#bb3791bf481222c63a5bc6b96ee23f68cb5614b9" + integrity sha512-GXfh9VLwB5ERaCsU6RULh7tkemeX15aNh6wuMEBtfdyMa7fFG8TXrhXlx1SoEK2Ty/l6XIkzzYIQmyaWW3JgdQ== dependencies: "@babel/runtime" "^7.10.3" From 3f718dc0294dbde53713e2992fdb018ddabb583f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 26 Mar 2026 17:43:00 +0100 Subject: [PATCH 4/5] chore(website): Upgrade to Algolia v4.6 (#11845) --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index e79cb89f0307..9682fe38eb50 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2116,24 +2116,24 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@docsearch/core@4.5.4": - version "4.5.4" - resolved "https://registry.yarnpkg.com/@docsearch/core/-/core-4.5.4.tgz#5f93dd99ed4de136bdd38988124b369b5d51e946" - integrity sha512-DbkfZbJyYAPFJtF71eAFOTQSy5z5c/hdSN0UrErORKDwXKLTJBR0c+5WxE5l+IKZx4xIaEa8RkrL7T28DTCOYw== +"@docsearch/core@4.6.2": + version "4.6.2" + resolved "https://registry.yarnpkg.com/@docsearch/core/-/core-4.6.2.tgz#0a6fdc13b1eb12153cb19316f911479b67f7bd58" + integrity sha512-/S0e6Dj7Zcm8m9Rru49YEX49dhU11be68c+S/BCyN8zQsTTgkKzXlhRbVL5mV6lOLC2+ZRRryaTdcm070Ug2oA== -"@docsearch/css@4.5.4": - version "4.5.4" - resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-4.5.4.tgz#99b69988bc061cd3772c25a2b155c9ee0813a0a2" - integrity sha512-gzO4DJwyM9c4YEPHwaLV1nUCDC2N6yoh0QJj44dce2rcfN71mB+jpu3+F+Y/KMDF1EKV0C3m54leSWsraE94xg== +"@docsearch/css@4.6.2": + version "4.6.2" + resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-4.6.2.tgz#986776619dccbf798176c75e858cc22f5e710bb4" + integrity sha512-fH/cn8BjEEdM2nJdjNMHIvOVYupG6AIDtFVDgIZrNzdCSj4KXr9kd+hsehqsNGYjpUjObeKYKvgy/IwCb1jZYQ== "@docsearch/react@^3.9.0 || ^4.3.2": - version "4.5.4" - resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-4.5.4.tgz#9eaa9e8c56afb8f5d6da9239221ca9dee1a8d043" - integrity sha512-iBNFfvWoUFRUJmGQ/r+0AEp2OJgJMoYIKRiRcTDON0hObBRSLlrv2ktb7w3nc1MeNm1JIpbPA99i59TiIR49fA== + version "4.6.2" + resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-4.6.2.tgz#e6c65fb87fb943eefaa936debe6d31bb51b25056" + integrity sha512-/BbtGFtqVOGwZx0dw/UfhN/0/DmMQYnulY4iv0tPRhC2JCXv0ka/+izwt3Jzo1ZxXS/2eMvv9zHsBJOK1I9f/w== dependencies: "@algolia/autocomplete-core" "1.19.2" - "@docsearch/core" "4.5.4" - "@docsearch/css" "4.5.4" + "@docsearch/core" "4.6.2" + "@docsearch/css" "4.6.2" "@docusaurus/responsive-loader@^1.7.0": version "1.7.0" From b27ee452347093f1fc0f2c99d2f1a19c5bfc336d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 26 Mar 2026 17:51:22 +0100 Subject: [PATCH 5/5] chore(website): disable `mdx1Compat.comments` on our site (#11846) --- .../tests/links/test-markdown-links.mdx | 2 -- .../_pages tests/markdown-tests-mdx.mdx | 23 ++++++++----------- website/docusaurus.config.ts | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/website/_dogfooding/_docs tests/tests/links/test-markdown-links.mdx b/website/_dogfooding/_docs tests/tests/links/test-markdown-links.mdx index e2ddf64da893..3e3d03d7e217 100644 --- a/website/_dogfooding/_docs tests/tests/links/test-markdown-links.mdx +++ b/website/_dogfooding/_docs tests/tests/links/test-markdown-links.mdx @@ -65,8 +65,6 @@ MDX/HTML comments with invalid file references should not be resolved nor report {/* [doesNotExist.mdx](doesNotExist.mdx) */} - - ## Reference-style links The following should also work: diff --git a/website/_dogfooding/_pages tests/markdown-tests-mdx.mdx b/website/_dogfooding/_pages tests/markdown-tests-mdx.mdx index 766c45ce57f7..1adab642b270 100644 --- a/website/_dogfooding/_pages tests/markdown-tests-mdx.mdx +++ b/website/_dogfooding/_pages tests/markdown-tests-mdx.mdx @@ -50,23 +50,18 @@ import TabItem from '@theme/TabItem'; ## Comments -Html comment: - -Html comment multi-line: - - - - MDX comment: {/* comment */} -MDX comment multi-line: +MDX comment in JSX: - -{/* -comment -*/} +<> + {/* comment */} + + {/* comment */} + TEST + {/* comment */} + + ## Import code block from source code file diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 7f541c1caf52..e0477b74bc17 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -235,7 +235,7 @@ export default async function createConfigAsync() { }, mdx1Compat: { headingIds: false, - // comments: false, + comments: false, }, remarkRehypeOptions: { footnoteLabel: getLocalizedConfigValue('remarkRehypeOptions_footnotes'),