Skip to content

Commit c80d5e6

Browse files
committed
temporarily disable createMdxLoaderDependencyFile
1 parent 64ec8cd commit c80d5e6

File tree

1 file changed

+9
-2
lines changed
  • packages/docusaurus-plugin-content-docs/src

1 file changed

+9
-2
lines changed

packages/docusaurus-plugin-content-docs/src/index.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ async function createMdxLoaderDependencyFile({
7676
dataDir: string;
7777
options: PluginOptions;
7878
versionsMetadata: VersionMetadata[];
79-
}) {
79+
}): Promise<string | undefined> {
80+
// TODO this has been temporarily made opt-in until Rspack cache bug is fixed
81+
// See https://github.com/facebook/docusaurus/pull/10931
82+
// See https://github.com/facebook/docusaurus/pull/10934#issuecomment-2672253145
83+
if (!process.env.DOCUSAURUS_ENABLE_MDX_DEPENDENCY_FILE) {
84+
return undefined;
85+
}
86+
8087
const filePath = path.join(dataDir, '__mdx-loader-dependency.json');
8188
// the cache is invalidated whenever this file content changes
8289
const fileContent = {
@@ -138,7 +145,7 @@ export default async function pluginContentDocs(
138145
options,
139146
versionsMetadata,
140147
}),
141-
],
148+
].filter((d): d is string => typeof d === 'string'),
142149

143150
useCrossCompilerCache:
144151
siteConfig.future.experimental_faster.mdxCrossCompilerCache,

0 commit comments

Comments
 (0)