(modulePath: string)
| 4 | const require = createRequire(import.meta.url); |
| 5 | |
| 6 | export function deleteFromRequireCache(modulePath: string): void { |
| 7 | const logger = useLogger(); |
| 8 | |
| 9 | try { |
| 10 | const moduleCachePath = require.resolve(modulePath); |
| 11 | delete require.cache[moduleCachePath]; |
| 12 | } catch { |
| 13 | logger.trace(`Module cache not found for ${modulePath}, skipped cache delete.`); |
| 14 | } |
| 15 | } |
no test coverage detected