There was an error while loading. Please reload this page.
1 parent 133c057 commit 1b4fc8bCopy full SHA for 1b4fc8b
1 file changed
packages/rstack/bin/rs.js
@@ -1,12 +1,15 @@
1
#!/usr/bin/env node
2
import nodeModule from 'node:module';
3
4
-// enable on-disk code caching of all modules loaded by Node.js
+// enable on-disk code caching and share its directory with child workers
5
// requires Nodejs >= 22.8.0
6
const { enableCompileCache } = nodeModule;
7
if (enableCompileCache) {
8
try {
9
- enableCompileCache();
+ const { directory } = enableCompileCache();
10
+ if (directory) {
11
+ process.env.NODE_COMPILE_CACHE = directory;
12
+ }
13
} catch {
14
// ignore errors
15
}
0 commit comments