mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-17 08:37:57 +02:00
workaround for test issue related to createMdxLoaderDependencyFile
This commit is contained in:
parent
da08536816
commit
74c96bd2a5
1 changed files with 6 additions and 0 deletions
|
@ -62,6 +62,12 @@ async function createMdxLoaderDependencyFile({
|
||||||
options: PluginOptions;
|
options: PluginOptions;
|
||||||
versionsMetadata: VersionMetadata[];
|
versionsMetadata: VersionMetadata[];
|
||||||
}): Promise<string | undefined> {
|
}): Promise<string | undefined> {
|
||||||
|
// Disabled for unit tests, the side effect produces infinite watch loops
|
||||||
|
// TODO find a better way :/
|
||||||
|
if (process.env.NODE_ENV === 'test') {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const filePath = path.join(dataDir, '__mdx-loader-dependency.json');
|
const filePath = path.join(dataDir, '__mdx-loader-dependency.json');
|
||||||
// the cache is invalidated whenever this file content changes
|
// the cache is invalidated whenever this file content changes
|
||||||
const fileContent = {
|
const fileContent = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue