MCPcopy Index your code
hub / github.com/facebook/docusaurus / getExperiments

Function getExperiments

packages/docusaurus/src/webpack/base.ts:152–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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,

Callers 1

createBaseConfigFunction · 0.85

Calls 3

getCacheNameFunction · 0.85
getCacheVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…