mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 13:37:05 +02:00
feat(core): Docusaurus Faster - Rspack Persistent Cache (#10931)
This commit is contained in:
parent
5b848cb2f0
commit
e641568e7f
13 changed files with 285 additions and 95 deletions
|
@ -76,7 +76,14 @@ async function createMdxLoaderDependencyFile({
|
|||
dataDir: string;
|
||||
options: PluginOptions;
|
||||
versionsMetadata: VersionMetadata[];
|
||||
}) {
|
||||
}): Promise<string | undefined> {
|
||||
// TODO this has been temporarily made opt-in until Rspack cache bug is fixed
|
||||
// See https://github.com/facebook/docusaurus/pull/10931
|
||||
// See https://github.com/facebook/docusaurus/pull/10934#issuecomment-2672253145
|
||||
if (!process.env.DOCUSAURUS_ENABLE_MDX_DEPENDENCY_FILE) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const filePath = path.join(dataDir, '__mdx-loader-dependency.json');
|
||||
// the cache is invalidated whenever this file content changes
|
||||
const fileContent = {
|
||||
|
@ -138,7 +145,7 @@ export default async function pluginContentDocs(
|
|||
options,
|
||||
versionsMetadata,
|
||||
}),
|
||||
],
|
||||
].filter((d): d is string => typeof d === 'string'),
|
||||
|
||||
useCrossCompilerCache:
|
||||
siteConfig.future.experimental_faster.mdxCrossCompilerCache,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue