Skip to content

Commit

Permalink
fix: Update getIndexHash.ts to support mdx and traverseAll (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
csantos1113 authored May 18, 2022
1 parent 31e25f4 commit 717942e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/utils/getIndexHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getIndexHash(config: ProcessedPluginOptions): string | null {
} else if (!fs.lstatSync(dir).isDirectory()) {
console.warn(`Warn: \`${dirField}\` is not a directory: "${dir}".`);
} else {
files.push(...klawSync(dir, { nodir: true, filter: markdownFilter }));
files.push(...klawSync(dir, { nodir: true, filter: markdownFilter, traverseAll: true }));
}
}
}
Expand Down Expand Up @@ -57,5 +57,5 @@ export function getIndexHash(config: ProcessedPluginOptions): string | null {
}

function markdownFilter(item: klawSync.Item): boolean {
return item.path.endsWith(".md");
return item.path.endsWith(".md") || item.path.endsWith(".mdx");
}

0 comments on commit 717942e

Please sign in to comment.