Repository navigation
fix(core): evict the bundler persistent cache when the Browserslist queries change (AI-assisted) - #12727
Merged
Conversation
…ueries change (AI-assisted) Loader and minimizer options are not part of the persistent cache key, so a Browserslist config change kept serving stale JS and CSS until running docusaurus clear. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes stale build output in
@docusaurus/coreafter a Browserslist config change (AI-assisted).The bundler persistent cache is only evicted when its
versionstring changes, or when one of thebuildDependenciesfiles changes (Docusaurus webpack config files and the site config). Loader and minimizer options are not part of the cache key. Changing the Browserslist config inpackage.jsonor.browserslistrckept serving JS and CSS compiled for the former targets until runningdocusaurus clear.The cache version now includes a hash of the Browserslist queries used by SWC,
postcss-preset-envand Lightning CSS.Test Plan
base.test.ts: the cache version changes when the Browserslist queries change. It fails without the fix.postcss-preset-envoutput after only itsbrowsersoption changed."browserslist": ["chrome 90"]and rebuilt withoutdocusaurus clear: the CSS was recompiled with emulated cascade layers.Test links
Deploy preview: https://deploy-preview-12727--docusaurus-2.netlify.app/
Related issues/PRs
postcss-preset-envuse the Docusaurus default Browserslist queries, found while testing it🤖 Generated with Claude Code