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:
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;
}
|
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
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
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
// @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