()
| 150 | } |
| 151 | |
| 152 | function getExperiments(): Configuration['experiments'] { |
| 153 | if (props.currentBundler.name === 'rspack') { |
| 154 | // TODO find a way to type this |
| 155 | const experiments: any = {}; |
| 156 | |
| 157 | if (!process.env.DOCUSAURUS_NO_PERSISTENT_CACHE) { |
| 158 | experiments.cache = { |
| 159 | type: 'persistent', |
| 160 | // Rspack doesn't have "cache.name" like Webpack |
| 161 | // This is not ideal but work around is to merge name/version |
| 162 | // See https://github.com/web-infra-dev/rspack/pull/8920#issuecomment-2658938695 |
| 163 | version: `${getCacheName()}-${getCacheVersion()}`, |
| 164 | buildDependencies: getCacheBuildDependencies(), |
| 165 | }; |
| 166 | } |
| 167 | |
| 168 | return experiments; |
| 169 | } |
| 170 | return undefined; |
| 171 | } |
| 172 | |
| 173 | return { |
| 174 | mode, |
no test coverage detected
searching dependent graphs…