-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Labels
proposalThis issue is a proposal, usually non-trivial changeThis issue is a proposal, usually non-trivial change
Description
Have you read the Contributing Guidelines on issues?
- I have 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:
| return undefined; |
if (props.currentBundler.name === 'rspack') {
// TODO Rspack only supports memory cache (as of Sept 2024)
// TODO re-enable file persistent cache one Rspack supports it
// See also https://rspack.dev/config/cache#cache
- return undefined;
+ return true;
}docusaurus/packages/docusaurus/src/webpack/base.ts
Lines 144 to 154 in 97690ab
| return { | |
| // This is mostly useful in dev | |
| // See https://rspack.dev/config/experiments#experimentsincremental | |
| // Produces warnings in production builds | |
| // See https://github.com/web-infra-dev/rspack/pull/8311#issuecomment-2476014664 | |
| // We use the same integration as Rspress, with ability to disable | |
| // See https://github.com/web-infra-dev/rspress/pull/1631 | |
| // See https://github.com/facebook/docusaurus/issues/10646 | |
| // @ts-expect-error: Rspack-only, not available in Webpack typedefs | |
| incremental: !isProd && !process.env.DISABLE_RSPACK_INCREMENTAL, | |
| }; |
// @ts-expect-error: Rspack-only, not available in Webpack typedefs
incremental: !isProd && !process.env.DISABLE_RSPACK_INCREMENTAL,
+ cache: {
+ type: 'persistent',
+ // Some extra options
+ },
};Self-service
- I'd be willing to do some initial work on this proposal myself.
moonwalk47
Metadata
Metadata
Assignees
Labels
proposalThis issue is a proposal, usually non-trivial changeThis issue is a proposal, usually non-trivial change