From 87e742f656ba5a91ff63153e8e46b922ea9208bf Mon Sep 17 00:00:00 2001 From: sebastien Date: Thu, 22 Aug 2024 19:50:05 +0200 Subject: [PATCH] Add basic experimental_faster doc --- website/docs/api/docusaurus.config.js.mdx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/website/docs/api/docusaurus.config.js.mdx b/website/docs/api/docusaurus.config.js.mdx index 9fc51186bd6d..9f47e9cf39bb 100644 --- a/website/docs/api/docusaurus.config.js.mdx +++ b/website/docs/api/docusaurus.config.js.mdx @@ -197,6 +197,9 @@ Example: ```js title="docusaurus.config.js" export default { future: { + experimental_faster: { + swcJsLoader: true, + }, experimental_storage: { type: 'localStorage', namespace: true, @@ -206,6 +209,8 @@ export default { }; ``` +- `experimental_faster`: An object containing feature flags to make the Docusaurus build faster. This requires adding the `@docusaurus/faster` package to your site's dependencies. Use `true` as a shorthand to enable all flags. + - `swcJsLoader`: Use `true` to replace the default [Babel](https://babeljs.io/) JS loader by [SWC](https://swc.rs/) loader to speed up the bundling phase. - `experimental_storage`: Site-wide browser storage options that theme authors should strive to respect. - `type`: The browser storage theme authors should use. Possible values are `localStorage` and `sessionStorage`. Defaults to `localStorage`. - `namespace`: Whether to namespace the browser storage keys to avoid storage key conflicts when Docusaurus sites are hosted under the same domain, or on localhost. Possible values are `string | boolean`. The namespace is appended at the end of the storage keys `key-namespace`. Use `true` to automatically generate a random namespace from your site `url + baseUrl`. Defaults to `false` (no namespace, historical behavior).