Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): fix mdx loader cache invalidation bug on versions changes #10934

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Feb 14, 2025

Motivation

We have a bundler cache invalidation problem, that I discovered while working on #10931

The following works:

DOCUSAURUS_SLOWER=true 

yarn clear:website
yarn build:website --locale en
yarn build:website --locale en

yarn clear:website
yarn build:website:fast
yarn build:website:fast

But the following fails with broken link errors:

DOCUSAURUS_SLOWER=true 

yarn clear:website
yarn build:website --locale en
yarn build:website:fast
  Exhaustive list of all broken links found:
  - Broken link on source page path = /docs:
     -> linking to /docs/next/migration
  - Broken link on source page path = /docs/advanced:
     -> linking to /docs/next/api/plugin-methods
  - Broken link on source page path = /docs/advanced/architecture:
     -> linking to /docs/next/docusaurus-core#useDocusaurusContext
  - Broken link on source page path = /docs/advanced/client:
     -> linking to /docs/next/swizzling#wrapping
     -> linking to /docs/next/api/plugin-methods/lifecycle-apis#getClientModules
     -> linking to /docs/next/api/docusaurus-config#clientModules
     -> linking to /docs/next/advanced/ssg#escape-hatches
     -> linking to /docs/next/styling-layout#global-styles
     -> linking to /docs/next/swizzling
  - Broken link on source page path = /docs/advanced/plugins:
     -> linking to /docs/next/api/plugin-methods
     -> linking to /docs/next/api/plugin-methods/lifecycle-apis#addRoute
     -> linking to /docs/next/api/plugin-methods/lifecycle-apis#setGlobalData
     -> linking to /docs/next/advanced/architecture
     -> linking to /docs/next/api/plugin-methods/lifecycle-apis#loadContent
     -> linking to /docs/next/api/plugin-methods/extend-infrastructure#getThemePath

...

This is because our docs plugin has:

const isBuildFast = !!process.env.BUILD_FAST;

docsOptions.lastVersion: isBuildFast ? 'current' : getLastStableVersion(),`

This option affects the URLs of the versions/docs through an env variable, which in turn affect the MDX loader resolveMarkdownLink.

Depending on env variables, @site/docs/my-doc.md might resolve to:

  • /docs/my-doc
  • /docs/next/my-doc
  • /docs//my-doc

Problem, the MDX loader cache entries are not invalidated when this happens, leading to "reusing" stale cache hits.


Our MDX loader uses this.cacheable(true) (default) but is non-deterministic and the same input doesn't always lead to the same output (depending on plugin/loader options).

https://webpack.js.org/api/loaders/#thiscacheable

A cacheable loader must have a deterministic result when inputs and dependencies haven't changed. This means the loader shouldn't have dependencies other than those specified with this.addDependency.

Most options are passed through docusaurus.config.js, and this file is declared as a Webpack buildDependency: changing it will invalidate the whole cache.

However, it remains possible to change plugin options without modifying docusaurus.config.js. For example, when using env variables, the config file is not updated and the site cache isn't invalidated. And there are even more ways to have a stale cache that doesn't invalidate properly, such as cutting a new docs version.


Unfortunately, Webpack loader API is not super convenient to help us invalidate its cached entries.

I thought entries would get invalidated automatically on options change, but it doesn't look to be the case. Also, there's no cache.version on the loader like there is globally, and we need to write a file to disk and add it to this.addDependency(file) so that our MDX files are evicted from the cache.

The solution I'm adding is to add a new mdx-loader dependencies object to trigger cache invalidations, and pass it a __mdx-loader-dependency.json file that will contain anything that should lead to cache invalidation (using plugin options and versions).

This solves the problem on the docs plugin. The persistent cache still works, when options/versions don't change, but invalidates properly. The repro case above now works without error:

DOCUSAURUS_SLOWER=true 

yarn clear:website
yarn build:website --locale en
yarn build:website:fast

I'm not 100% sure this is the perfect solution, but at least it solves the problem above. This PR is mostly here to document the problem and get it out of my head so that we can come back to it later.

We'll figure out a way to generalize this solution to our other plugins, and how to help third-party plugin authors ensure the cache gets invalidated properly too.

There are likely many other edge cases to consider:

  • changing siteConfig.markdown options with env variables
  • changing other content plugin options with env variables
  • changing the behavior of a custom remark plugin with env variables
  • using fs.readFile in docusaurus.config.js and use the file content to alter the Docusaurus site config
  • 3rd party plugins using our MDX loader
  • any env variable used in any loader

Most likely, we need to expose APIs to the end user to be able to control cache invalidation on their own, because it's impossible to cover all cases automatically.

Fortunately, docusaurus clear remains a good workaround

Test Plan

local, not easy to cover in CI 😅

Test links

https://deploy-preview-10934--docusaurus-2.netlify.app/

https://deploy-preview-10934--docusaurus-2.netlify.app/docs/api/docusaurus-config/#future

Related issues/PRs

#10931

@slorber slorber requested a review from Josh-Cena as a code owner February 14, 2025 15:59
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Feb 14, 2025
Copy link

netlify bot commented Feb 14, 2025

[V2]

Name Link
🔨 Latest commit 4b510e0
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/67af6bfc24670c0008cfe603
😎 Deploy Preview https://deploy-preview-10934--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Feb 14, 2025

Size Change: +307 B (0%)

Total Size: 11.1 MB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.4 kB 0 B
website/.docusaurus/globalData.json 31.9 kB 0 B
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/registry.js 162 kB 0 B
website/.docusaurus/routes.js 77.8 kB 0 B
website/.docusaurus/routesChunkNames.json 85.4 kB 0 B
website/.docusaurus/site-metadata.json 2.3 kB 0 B
website/build/assets/css/styles.********.css 126 kB 0 B
website/build/assets/js/main.********.js 789 kB 0 B
website/build/assets/js/runtime~main.********.js 37.1 kB 0 B
website/build/blog.html 74.9 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 63.9 kB 0 B
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 43.6 kB +12 B (+0.03%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 47.8 kB 0 B
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 28.1 kB 0 B
website/build/blog/2019/12/30/docusaurus-2019-recap.html 37.1 kB -1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 31.6 kB 0 B
website/build/blog/2021/01/19/docusaurus-2020-recap.html 49.4 kB 0 B
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 45.8 kB -1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 45 kB 0 B
website/build/blog/2021/11/21/algolia-docsearch-migration.html 52.8 kB +12 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 41.8 kB 0 B
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 128 kB 0 B
website/build/blog/2022/09/01/docusaurus-2.1.html 48.9 kB -1 B (0%)
website/build/blog/archive.html 22.6 kB 0 B
website/build/blog/authors.html 47.6 kB 0 B
website/build/blog/authors/j-marcey.html 65.6 kB 0 B
website/build/blog/authors/josh-cena.html 44 kB 0 B
website/build/blog/authors/lex-111.html 51.2 kB 0 B
website/build/blog/authors/slorber.html 78.3 kB 0 B
website/build/blog/authors/slorber/authors/2.html 81.8 kB 0 B
website/build/blog/authors/slorber/authors/3.html 87.6 kB 0 B
website/build/blog/authors/slorber/authors/4.html 74.3 kB 0 B
website/build/blog/authors/yangshun.html 58.5 kB 0 B
website/build/blog/authors/zpao.html 44.5 kB 0 B
website/build/blog/page/2.html 79.2 kB 0 B
website/build/blog/page/3.html 85.3 kB 0 B
website/build/blog/page/4.html 74.7 kB 0 B
website/build/blog/page/5.html 44.5 kB 0 B
website/build/blog/page/6.html 28.8 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 123 kB +4 B (0%)
website/build/blog/releases/2.2.html 48.9 kB 0 B
website/build/blog/releases/2.3.html 59.2 kB 0 B
website/build/blog/releases/2.4.html 61.8 kB 0 B
website/build/blog/releases/3.0.html 103 kB +12 B (+0.01%)
website/build/blog/releases/3.1.html 51.9 kB +1 B (0%)
website/build/blog/releases/3.2.html 47.5 kB 0 B
website/build/blog/releases/3.3.html 54.7 kB 0 B
website/build/blog/releases/3.4.html 53.8 kB +7 B (+0.01%)
website/build/blog/releases/3.5.html 56.2 kB +1 B (0%)
website/build/blog/releases/3.6.html 73.4 kB +1 B (0%)
website/build/blog/releases/3.7.html 49.1 kB +1 B (0%)
website/build/blog/tags.html 26.1 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 121 kB 0 B
website/build/docs.html 46.3 kB 0 B
website/build/docs/advanced.html 28.5 kB 0 B
website/build/docs/advanced/architecture.html 27.9 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 66.9 kB 0 B
website/build/docs/advanced/plugins.html 52.3 kB 0 B
website/build/docs/advanced/routing.html 67.1 kB +8 B (+0.01%)
website/build/docs/advanced/ssg.html 71.4 kB 0 B
website/build/docs/api/docusaurus-config.html 181 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 41.5 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 33.9 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 32.9 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 34.2 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 37.8 kB 0 B
website/build/docs/api/misc/@docusaurus/logger.html 36.4 kB 0 B
website/build/docs/api/misc/create-docusaurus.html 31.6 kB 0 B
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 62.6 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 56.7 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 55 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 156 kB 0 B
website/build/docs/api/plugin-methods/static-methods.html 42.4 kB +4 B (+0.01%)
website/build/docs/api/plugins.html 29.7 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 55.8 kB +13 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 178 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 185 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 69.1 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 44.2 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 45.7 kB +3 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 45.2 kB -4 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 44.1 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 45.2 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 111 kB +4 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 36.9 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 61.5 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 41.9 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 37.2 kB +12 B (+0.03%)
website/build/docs/api/themes.html 27.8 kB 0 B
website/build/docs/api/themes/@docusaurus/theme-classic.html 40.4 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 33.6 kB +2 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 32.4 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 30.3 kB 0 B
website/build/docs/api/themes/configuration.html 229 kB -2 B (0%)
website/build/docs/blog.html 193 kB +6 B (0%)
website/build/docs/browser-support.html 44.7 kB 0 B
website/build/docs/category/getting-started.html 25.7 kB 0 B
website/build/docs/category/guides.html 33.6 kB 0 B
website/build/docs/cli.html 54.7 kB 0 B
website/build/docs/configuration.html 88 kB +7 B (+0.01%)
website/build/docs/create-doc.html 56.4 kB +12 B (+0.02%)
website/build/docs/creating-pages.html 53.8 kB +1 B (0%)
website/build/docs/deployment.html 181 kB +2 B (0%)
website/build/docs/docs-introduction.html 47.2 kB 0 B
website/build/docs/docs-multi-instance.html 67.4 kB +4 B (+0.01%)
website/build/docs/docusaurus-core.html 218 kB 0 B
website/build/docs/guides/whats-next.html 29.9 kB 0 B
website/build/docs/i18n/crowdin.html 129 kB +12 B (+0.01%)
website/build/docs/i18n/git.html 69.1 kB +4 B (+0.01%)
website/build/docs/i18n/introduction.html 45.6 kB 0 B
website/build/docs/i18n/tutorial.html 149 kB +13 B (+0.01%)
website/build/docs/installation.html 59 kB +5 B (+0.01%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 75.6 kB 0 B
website/build/docs/markdown-features/admonitions.html 106 kB +4 B (0%)
website/build/docs/markdown-features/assets.html 82.1 kB +2 B (0%)
website/build/docs/markdown-features/code-blocks.html 209 kB 0 B
website/build/docs/markdown-features/diagrams.html 47.8 kB +14 B (+0.03%)
website/build/docs/markdown-features/head-metadata.html 47.5 kB 0 B
website/build/docs/markdown-features/links.html 38.1 kB 0 B
website/build/docs/markdown-features/math-equations.html 84.6 kB +4 B (0%)
website/build/docs/markdown-features/plugins.html 90.3 kB +8 B (+0.01%)
website/build/docs/markdown-features/react.html 127 kB 0 B
website/build/docs/markdown-features/tabs.html 134 kB 0 B
website/build/docs/markdown-features/toc.html 78.4 kB +4 B (+0.01%)
website/build/docs/migration.html 35.4 kB +4 B (+0.01%)
website/build/docs/migration/v2.html 37 kB 0 B
website/build/docs/migration/v2/automated.html 36.6 kB 0 B
website/build/docs/migration/v2/manual.html 181 kB 0 B
website/build/docs/migration/v2/translated-sites.html 48.2 kB 0 B
website/build/docs/migration/v2/versioned-sites.html 57.3 kB +8 B (+0.01%)
website/build/docs/migration/v3.html 184 kB +2 B (0%)
website/build/docs/playground.html 29.8 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 106 kB +1 B (0%)
website/build/docs/seo.html 83.9 kB +13 B (+0.02%)
website/build/docs/sidebar.html 124 kB +7 B (+0.01%)
website/build/docs/sidebar/autogenerated.html 139 kB +13 B (+0.01%)
website/build/docs/sidebar/items.html 165 kB 0 B
website/build/docs/sidebar/multiple-sidebars.html 58.3 kB +4 B (+0.01%)
website/build/docs/static-assets.html 48.7 kB +4 B (+0.01%)
website/build/docs/styling-layout.html 124 kB +1 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 101 kB +14 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 56.1 kB +4 B (+0.01%)
website/build/docs/using-plugins.html 100 kB 0 B
website/build/docs/versioning.html 86.3 kB -2 B (0%)
website/build/index.html 34.8 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_FASTER

Copy link

github-actions bot commented Feb 14, 2025

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🟠 70 🟢 98 🟢 96 🟢 100 Report
/docs/installation 🟠 51 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 72 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 63 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 62 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 64 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 71 🟢 100 🟢 100 🟠 86 Report

Copy link

github-actions bot commented Feb 14, 2025

Size Change: +297 B (0%)

Total Size: 11.5 MB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 28.4 kB 0 B
website/.docusaurus/globalData.json 31.9 kB 0 B
website/.docusaurus/i18n.json 930 B 0 B
website/.docusaurus/registry.js 162 kB 0 B
website/.docusaurus/routes.js 77.8 kB 0 B
website/.docusaurus/routesChunkNames.json 85.4 kB 0 B
website/.docusaurus/site-metadata.json 2.3 kB 0 B
website/build/assets/css/styles.********.css 119 kB 0 B
website/build/assets/js/main.********.js 793 kB 0 B
website/build/assets/js/runtime~main.********.js 36.4 kB 0 B
website/build/blog.html 77.7 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 66.2 kB 0 B
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 45.6 kB +12 B (+0.03%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 49.9 kB 0 B
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 29.8 kB 0 B
website/build/blog/2019/12/30/docusaurus-2019-recap.html 39 kB -1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 33.4 kB 0 B
website/build/blog/2021/01/19/docusaurus-2020-recap.html 51.6 kB 0 B
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 47.9 kB -1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 47.1 kB 0 B
website/build/blog/2021/11/21/algolia-docsearch-migration.html 55.2 kB +12 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 43.9 kB 0 B
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 133 kB 0 B
website/build/blog/2022/09/01/docusaurus-2.1.html 51.3 kB -1 B (0%)
website/build/blog/archive.html 24.1 kB 0 B
website/build/blog/authors.html 49.8 kB 0 B
website/build/blog/authors/j-marcey.html 68.2 kB 0 B
website/build/blog/authors/josh-cena.html 46.1 kB 0 B
website/build/blog/authors/lex-111.html 53.4 kB 0 B
website/build/blog/authors/slorber.html 81.3 kB 0 B
website/build/blog/authors/slorber/authors/2.html 84.9 kB 0 B
website/build/blog/authors/slorber/authors/3.html 90.8 kB 0 B
website/build/blog/authors/slorber/authors/4.html 77.1 kB 0 B
website/build/blog/authors/yangshun.html 60.9 kB 0 B
website/build/blog/authors/zpao.html 46.6 kB 0 B
website/build/blog/page/2.html 82.1 kB 0 B
website/build/blog/page/3.html 88.3 kB 0 B
website/build/blog/page/4.html 77.4 kB 0 B
website/build/blog/page/5.html 46.6 kB 0 B
website/build/blog/page/6.html 30.5 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 128 kB -1 B (0%)
website/build/blog/releases/2.2.html 51.2 kB 0 B
website/build/blog/releases/2.3.html 61.8 kB 0 B
website/build/blog/releases/2.4.html 64.6 kB 0 B
website/build/blog/releases/3.0.html 107 kB +12 B (+0.01%)
website/build/blog/releases/3.1.html 54.2 kB +1 B (0%)
website/build/blog/releases/3.2.html 49.8 kB 0 B
website/build/blog/releases/3.3.html 57.1 kB 0 B
website/build/blog/releases/3.4.html 56.3 kB +7 B (+0.01%)
website/build/blog/releases/3.5.html 58.7 kB +1 B (0%)
website/build/blog/releases/3.6.html 76.5 kB +1 B (0%)
website/build/blog/releases/3.7.html 51.6 kB +1 B (0%)
website/build/blog/tags.html 27.9 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 126 kB 0 B
website/build/docs.html 48.3 kB 0 B
website/build/docs/advanced.html 30.1 kB 0 B
website/build/docs/advanced/architecture.html 29.6 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 69.7 kB 0 B
website/build/docs/advanced/plugins.html 54.6 kB 0 B
website/build/docs/advanced/routing.html 69.9 kB +8 B (+0.01%)
website/build/docs/advanced/ssg.html 74.6 kB 0 B
website/build/docs/api/docusaurus-config.html 188 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 43.8 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 35.9 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 34.7 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 36.1 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 39.7 kB 0 B
website/build/docs/api/misc/@docusaurus/logger.html 38.2 kB 0 B
website/build/docs/api/misc/create-docusaurus.html 33.3 kB 0 B
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 65.3 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 59.1 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 57.3 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 161 kB 0 B
website/build/docs/api/plugin-methods/static-methods.html 44.4 kB +4 B (+0.01%)
website/build/docs/api/plugins.html 31.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 58.5 kB +13 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 187 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 193 kB +1 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 72.8 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 46.4 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 48 kB +3 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 47.5 kB -4 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 46.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 47.6 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 117 kB +4 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 39 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 64.4 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 44.1 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 39.3 kB +12 B (+0.03%)
website/build/docs/api/themes.html 29.4 kB 0 B
website/build/docs/api/themes/@docusaurus/theme-classic.html 42.5 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 35.4 kB +2 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 34.2 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 32 kB 0 B
website/build/docs/api/themes/configuration.html 241 kB -2 B (0%)
website/build/docs/blog.html 199 kB +6 B (0%)
website/build/docs/browser-support.html 47 kB 0 B
website/build/docs/category/getting-started.html 27.2 kB 0 B
website/build/docs/category/guides.html 35.4 kB 0 B
website/build/docs/cli.html 58.2 kB 0 B
website/build/docs/configuration.html 91.7 kB +7 B (+0.01%)
website/build/docs/create-doc.html 59 kB +12 B (+0.02%)
website/build/docs/creating-pages.html 56.3 kB +1 B (0%)
website/build/docs/deployment.html 188 kB +2 B (0%)
website/build/docs/docs-introduction.html 49.6 kB 0 B
website/build/docs/docs-multi-instance.html 70.7 kB +4 B (+0.01%)
website/build/docs/docusaurus-core.html 226 kB 0 B
website/build/docs/guides/whats-next.html 31.7 kB 0 B
website/build/docs/i18n/crowdin.html 134 kB +12 B (+0.01%)
website/build/docs/i18n/git.html 72.3 kB +4 B (+0.01%)
website/build/docs/i18n/introduction.html 47.9 kB 0 B
website/build/docs/i18n/tutorial.html 155 kB +13 B (+0.01%)
website/build/docs/installation.html 61.7 kB +5 B (+0.01%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 78.6 kB 0 B
website/build/docs/markdown-features/admonitions.html 110 kB +4 B (0%)
website/build/docs/markdown-features/assets.html 86.1 kB +2 B (0%)
website/build/docs/markdown-features/code-blocks.html 217 kB 0 B
website/build/docs/markdown-features/diagrams.html 50.2 kB +14 B (+0.03%)
website/build/docs/markdown-features/head-metadata.html 49.9 kB 0 B
website/build/docs/markdown-features/links.html 40.2 kB 0 B
website/build/docs/markdown-features/math-equations.html 88.6 kB +4 B (0%)
website/build/docs/markdown-features/plugins.html 94 kB +8 B (+0.01%)
website/build/docs/markdown-features/react.html 132 kB 0 B
website/build/docs/markdown-features/tabs.html 140 kB 0 B
website/build/docs/markdown-features/toc.html 81.9 kB +4 B (0%)
website/build/docs/migration.html 37.4 kB -1 B (0%)
website/build/docs/migration/v2.html 38.9 kB 0 B
website/build/docs/migration/v2/automated.html 38.6 kB 0 B
website/build/docs/migration/v2/manual.html 188 kB 0 B
website/build/docs/migration/v2/translated-sites.html 50.5 kB 0 B
website/build/docs/migration/v2/versioned-sites.html 59.7 kB +8 B (+0.01%)
website/build/docs/migration/v3.html 191 kB +2 B (0%)
website/build/docs/playground.html 31.5 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 110 kB +1 B (0%)
website/build/docs/seo.html 87.8 kB +13 B (+0.01%)
website/build/docs/sidebar.html 130 kB +7 B (+0.01%)
website/build/docs/sidebar/autogenerated.html 145 kB +13 B (+0.01%)
website/build/docs/sidebar/items.html 171 kB 0 B
website/build/docs/sidebar/multiple-sidebars.html 61.2 kB +4 B (+0.01%)
website/build/docs/static-assets.html 51.1 kB +4 B (+0.01%)
website/build/docs/styling-layout.html 129 kB +1 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 105 kB +14 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 58.7 kB +4 B (+0.01%)
website/build/docs/using-plugins.html 104 kB 0 B
website/build/docs/versioning.html 90.1 kB -2 B (0%)
website/build/index.html 36.6 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_SLOWER

@slorber slorber merged commit af272bd into main Feb 14, 2025
38 checks passed
@slorber slorber deleted the slorber/fix-webpack-cache-issue branch February 14, 2025 16:46
@slorber
Copy link
Collaborator Author

slorber commented Feb 20, 2025

Unfortunately this fix prevents Rspack persistent cache from optimizing any MDX file of the docs plugin, so I'm temporarily disabling it (making it opt-in with secret env var) in #10931

We'll re-enable this later once Rspack fixes its bug web-infra-dev/rspack#9413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants