File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/docusaurus-plugin-content-docs/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,14 @@ async function createMdxLoaderDependencyFile({
76
76
dataDir : string ;
77
77
options : PluginOptions ;
78
78
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
+
80
87
const filePath = path . join ( dataDir , '__mdx-loader-dependency.json' ) ;
81
88
// the cache is invalidated whenever this file content changes
82
89
const fileContent = {
@@ -138,7 +145,7 @@ export default async function pluginContentDocs(
138
145
options,
139
146
versionsMetadata,
140
147
} ) ,
141
- ] ,
148
+ ] . filter ( ( d ) : d is string => typeof d === 'string' ) ,
142
149
143
150
useCrossCompilerCache :
144
151
siteConfig . future . experimental_faster . mdxCrossCompilerCache ,
You can’t perform that action at this time.
0 commit comments