mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
fix(docs): fix mdx loader cache invalidation bug on versions changes (#10934)
This commit is contained in:
parent
a72a06ecb1
commit
af272bdefa
3 changed files with 36 additions and 0 deletions
|
@ -218,6 +218,7 @@ export async function mdxLoader(
|
|||
const compilerName = getWebpackLoaderCompilerName(this);
|
||||
const callback = this.async();
|
||||
const options: Options = this.getOptions();
|
||||
options.dependencies?.forEach(this.addDependency);
|
||||
try {
|
||||
const result = await loadMDXWithCaching({
|
||||
resource: this.resource,
|
||||
|
|
|
@ -11,6 +11,8 @@ import type {ResolveMarkdownLink} from './remark/resolveMarkdownLinks';
|
|||
import type {PromiseWithResolvers} from './utils';
|
||||
|
||||
export type Options = Partial<MDXOptions> & {
|
||||
dependencies?: string[];
|
||||
|
||||
markdownConfig: MarkdownConfig;
|
||||
staticDirs: string[];
|
||||
siteDir: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue