(modulePath: string, newModule: any)
| 59 | } |
| 60 | |
| 61 | function overrideModule(modulePath: string, newModule: any) { |
| 62 | if (!require.cache[modulePath]) { |
| 63 | throw new Error(`Module not found: ${modulePath}`); |
| 64 | } |
| 65 | require.cache[modulePath]!.exports = newModule; |
| 66 | log(`Overrode require cache for module: ${modulePath}`); |
| 67 | } |
| 68 | |
| 69 | function resolvePackageJson(cracoConfig: CracoConfig) { |
| 70 | return require.resolve( |
no test coverage detected
searching dependent graphs…