MCPcopy Index your code
hub / github.com/react/react / clearRequireCache

Function clearRequireCache

compiler/packages/snap/src/runner-worker.ts:38–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36const invalidationSubpath = 'packages/babel-plugin-react-compiler/dist';
37let version: number | null = null;
38export function clearRequireCache() {
39 Object.keys(require.cache).forEach(function (path) {
40 if (path.includes(invalidationSubpath)) {
41 delete require.cache[path];
42 }
43 });
44}
45
46async function compile(
47 input: string,

Callers 1

compileFunction · 0.85

Calls 2

keysMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected