-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Enable persistent cache in Faster + Rspack #10823
Comments
I tried already but it didn't work yet. It did rebuild faster but then the SSG failed. At best, we could expose this through env variables but I suspect it will fail on all sites. I'll ping the Rspack team about this when I have time to investigate a bit more (not this week, taking a break) |
You have already tried it, and it's bad news that it fails in SSG (I only tried it in preview with single locale by directly overwriting the JS file in |
It's an initial version, afaik they plan to support the same options as Webpack. This cache See also my explanation here: web-infra-dev/rspack#5658 (comment) BTW beta.0 is out right now: https://github.com/web-infra-dev/rspack/releases/tag/v1.2.0-beta.0 |
The design of the API has not been confirmed. I see. The type of I noticed the release of beta from the subscribed direct notification from Rspack. |
Yes, the rspack configuration is designed differently than webpack and will not be compatible with webpack. There are some reasons for this.
|
https://rspack.dev/config/experiments#migrating-from-webpack-config You prepared a migration guide that covers all options used by Docusaurus, so it seems to be in acceptable range and we can try it once.
|
|
Does the persistent cache in Rspack save files generated by loaderContext.emitFile? |
@tats-u Currently |
@jerrykingxyz Thank you for your quick response. That must be why. Does "next version" mean 1.3 as of now? |
I am actually working on fixing this right now, but it's a bit of work and will be included in version 1.2.3 on February 11th. |
Oh, you are going to release that feature in the next patch version. Much earlier than I thought. I appreciate your continuous quick work. |
Then we have to bump |
the more understanding i get about this the better it becomes |
1.2.3 has been released. https://github.com/web-infra-dev/rspack/releases/tag/v1.2.3 This? I think the ball is in our court now. |
Yes, I noted to ad a new Docusaurus Faster option once this gets released. Will work on it soon. |
I merged the persistent cache for v3.8 However there is a bug in Rspack cache that prevents many of our files to be cached properly (all the code-generated files, notably all those in I've documented this with benchmarks in #10931 I hope that they fix it soon so that we can announce better benchmarks when releasing v3.8 |
Hooray! The bug you mention is web-infra-dev/rspack#9413. |
Have you read the Contributing Guidelines on issues?
Motivation
Rspack 1.2.0-alpha.0 used in Faster 3.7 now supports the experimental persistent cache.
https://github.com/web-infra-dev/rspack/releases/tag/v1.2.0-alpha.0
https://rspack.dev/config/experiments#persistent-cache
We need to modify the following parts:
docusaurus/packages/docusaurus/src/webpack/base.ts
Line 111 in 97690ab
docusaurus/packages/docusaurus/src/webpack/base.ts
Lines 144 to 154 in 97690ab
Self-service
The text was updated successfully, but these errors were encountered: