{"record":{"id":"580242c4e504dd82","repo":"facebook/docusaurus","slug":"docusaurus-config-flag-future-faster-rspackpersist","errorCode":null,"errorMessage":"Docusaurus config flag future.faster.rspackPersistentCache requires the flag future.faster.rspackBundler to be turned on.","messagePattern":"Docusaurus config flag future\\.faster\\.rspackPersistentCache requires the flag future\\.faster\\.rspackBundler to be turned on\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus/src/server/configValidation.ts","lineNumber":631,"sourceCode":"    config.onBrokenMarkdownLinks = undefined;\n  }\n\n  // We normalize the VCS config when using a boolean value\n  if (typeof config.future.experimental_vcs === 'boolean') {\n    const vcsConfig = config.future.experimental_vcs\n      ? config.future.faster.gitEagerVcs\n        ? getVcsPreset('default-v2')\n        : getVcsPreset('default-v1')\n      : getVcsPreset('disabled');\n\n    config.future.experimental_vcs = vcsConfig;\n  }\n\n  if (\n    config.future.faster.rspackPersistentCache &&\n    !config.future.faster.rspackBundler\n  ) {\n    throw new Error(\n      `Docusaurus config flag ${logger.code(\n        'future.faster.rspackPersistentCache',\n      )} requires the flag ${logger.code(\n        'future.faster.rspackBundler',\n      )} to be turned on.`,\n    );\n  }\n}\n\n// TODO move to @docusaurus/utils-validation\nexport function validateConfig(\n  config: unknown,\n  siteConfigPath: string,\n): DocusaurusConfig {\n  const {error, warning, value} = ConfigSchema.validate(config, {\n    abortEarly: false,\n  });\n","sourceCodeStart":613,"sourceCodeEnd":649,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus/src/server/configValidation.ts#L613-L649","documentation":"Thrown during config post-processing when a user enables the `future.faster.rspackPersistentCache` flag without also enabling `future.faster.rspackBundler`. The persistent cache is a feature of the Rspack bundler, so it cannot function under the default Webpack bundler — Docusaurus rejects this combination rather than silently ignoring the cache flag. It is a hard dependency declared after the VCS config block in postProcessDocusaurusConfig.","triggerScenarios":"Setting `future: { faster: { rspackPersistentCache: true } }` in docusaurus.config.js while leaving `rspackBundler` unset/false. The check at configValidation.ts:631 fires whenever `config.future.faster.rspackPersistentCache` is truthy AND `config.future.faster.rspackBundler` is falsy.","commonSituations":"Copy-pasting only part of the `future.faster` preset from release notes; enabling the cache flag in isolation assuming it works on Webpack; upgrading Docusaurus and opting into speed flags piecemeal.","solutions":["Add `rspackBundler: true` alongside `rspackPersistentCache: true` in the `future.faster` block of docusaurus.config.js.","If you did not intend to switch bundlers, remove the `rspackPersistentCache` flag entirely.","Use the full `future: { faster: true }` shorthand to enable all faster flags consistently."],"exampleFix":"// before\nfuture: {\n  faster: {\n    rspackPersistentCache: true,\n  },\n},\n// after\nfuture: {\n  faster: {\n    rspackBundler: true,\n    rspackPersistentCache: true,\n  },\n},","handlingStrategy":"validation","validationCode":"// Before applying future flags, check the dependency:\nconst faster = config.future?.faster ?? {};\nif (faster.rspackPersistentCache && !faster.rspackBundler) {\n  throw new Error('Enable future.faster.rspackBundler before rspackPersistentCache.');\n}","typeGuard":"function isValidFasterFlags(f: unknown): f is {rspackBundler?: boolean; rspackPersistentCache?: boolean} {\n  if (!f || typeof f !== 'object') return true; // absence is valid\n  const o = f as Record<string, unknown>;\n  return !(o.rspackPersistentCache && !o.rspackBundler);\n}","tryCatchPattern":null,"preventionTips":["Use `future: { faster: true }` to flip all flags together instead of opting in piecemeal.","Treat the `future.faster` block as atomic — review every flag when adding any one.","Read the future-flags release note before enabling; each flag has declared dependencies."],"tags":["config","rspack","bundling","future-flags"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}