diff --git a/src/lib/configuration-loader.ts b/src/lib/configuration-loader.ts index 7543224..70c9f4e 100644 --- a/src/lib/configuration-loader.ts +++ b/src/lib/configuration-loader.ts @@ -147,15 +147,17 @@ async function withTsImport(filePath: string) { // Slower, but allows files to be considered as part of larger TypeScript // programs, which should allow path mappings to work. mode: tsImport.LoadMode.Compile, + // N.B. Even with this set to false, ts-import still seems to create (and + // leave behind) a .cache directory. useCache: false }); // Clean-up the cache directory left behind by ts-import. - // try { - // await fs.remove(path.join(path.dirname(filePath), '.cache')); - // } catch (err: any) { - // log.error(log.prefix('ts-import'), 'Error removing cache directory:', err); - // } + try { + await fs.remove(path.join(path.dirname(filePath), '.cache')); + } catch (err: any) { + log.error(log.prefix('ts-import'), 'Error removing cache directory:', err); + } return result?.default || result; }