Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/repomix.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/usr/bin/env node

// https://nodejs.org/api/module.html#module-compile-cache
// Enable compile cache for the main process and propagate the cache directory
// via NODE_COMPILE_CACHE env var so child_process workers inherit it at startup
// (before any modules are loaded), which is critical for ESM static imports.
const nodeModule = require('node:module');
if (nodeModule.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
try {
nodeModule.enableCompileCache();
const result = nodeModule.enableCompileCache();
if (result && result.directory && !process.env.NODE_COMPILE_CACHE) {
process.env.NODE_COMPILE_CACHE = result.directory;
}
} catch {
// Ignore errors
}
Expand Down
Loading