Skip to content

Commit

Permalink
Add basic experimental_faster doc
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Aug 22, 2024
1 parent f178a0a commit 87e742f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website/docs/api/docusaurus.config.js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ Example:
```js title="docusaurus.config.js"
export default {
future: {
experimental_faster: {
swcJsLoader: true,
},
experimental_storage: {
type: 'localStorage',
namespace: true,
Expand All @@ -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).
Expand Down

0 comments on commit 87e742f

Please sign in to comment.