()
| 122 | } |
| 123 | |
| 124 | function getCache(): Configuration['cache'] { |
| 125 | // Use default: memory cache in dev, nothing in prod |
| 126 | // See https://rspack.dev/config/cache#cache |
| 127 | const disabledPersistentCacheValue = undefined; |
| 128 | |
| 129 | if (process.env.DOCUSAURUS_NO_PERSISTENT_CACHE) { |
| 130 | return disabledPersistentCacheValue; |
| 131 | } |
| 132 | if (props.currentBundler.name === 'rspack') { |
| 133 | if (props.siteConfig.future.faster.rspackPersistentCache) { |
| 134 | // Use cache: true + experiments.cache.type: "persistent" |
| 135 | // See https://rspack.dev/config/experiments#persistent-cache |
| 136 | return true; |
| 137 | } else { |
| 138 | return disabledPersistentCacheValue; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | return { |
| 143 | type: 'filesystem', |
| 144 | name: getCacheName(), |
| 145 | version: getCacheVersion(), |
| 146 | buildDependencies: { |
| 147 | config: getCacheBuildDependencies(), |
| 148 | }, |
| 149 | }; |
| 150 | } |
| 151 | |
| 152 | function getExperiments(): Configuration['experiments'] { |
| 153 | if (props.currentBundler.name === 'rspack') { |
no test coverage detected
searching dependent graphs…