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(v2): Fix Webpack persistent caching (evict on swizzle/alias/config change) #5047

Merged
merged 7 commits into from
Jun 24, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Jun 23, 2021

Motivation

We have a few webpack 5 issues related to persistent caching, caching a bit too aggressively:

  • After swizzle (webpack resolve.alias changes), we now need to run docusaurus clear again or we'll keep seeing the older component
  • After a Docusaurus config change, the cache should rather be invalidated, as docusaurus config can affect compilation (particularly remark plugins)

Also upgrading some Webpack related deps

Related issues:

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

tests + dogfooding

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Jun 23, 2021
@slorber slorber requested a review from lex111 as a code owner June 23, 2021 17:36
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 23, 2021
@slorber slorber changed the title Slorber/fix webpack cache aliases fix(v2): Fix Webpack 5 persistent caching issues (evict cache on swizzle/alias/config change) Jun 23, 2021
@slorber slorber changed the title fix(v2): Fix Webpack 5 persistent caching issues (evict cache on swizzle/alias/config change) fix(v2): Fix Webpack persistent caching (evict on swizzle/alias/config change) Jun 23, 2021
@netlify
Copy link

netlify bot commented Jun 23, 2021

✔️ [V2]

🔨 Explore the source changes: a3e2567

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60d461fdf3dc5c00075ae431

😎 Browse the preview: https://deploy-preview-5047--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jun 23, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 85
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5047--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Jun 23, 2021

Size Change: +2.16 kB (0%)

Total Size: 571 kB

Filename Size Change
website/build/assets/css/styles.********.css 87.7 kB +75 B (0%)
website/build/assets/js/main.********.js 386 kB +871 B (0%)
website/build/blog/2017/12/14/introducing-docusaurus/index.html 66.4 kB +605 B (+1%)
website/build/index.html 31.1 kB +605 B (+2%)
ℹ️ View Unchanged
Filename Size
website/build/docs/introduction/index.html 235 B

compressed-size-action

@slorber slorber merged commit 99270db into master Jun 24, 2021
@slorber slorber deleted the slorber/fix-webpack-cache-aliases branch August 17, 2021 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants