Commit 6c8a5a2 1 parent beaf7e8 commit 6c8a5a2 Copy full SHA for 6c8a5a2
File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ function start() {
49
49
try {
50
50
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
51
51
module . enableCompileCache ?. ( )
52
+ // flush the cache after 10s because the cache is not flushed until process end
53
+ // for dev server, the cache is never flushed unless manually flushed because the process.exit is called
54
+ // also flushing the cache in SIGINT handler seems to cause the process to hang
55
+ setTimeout ( ( ) => {
56
+ try {
57
+ // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists
58
+ module . flushCompileCache ?. ( )
59
+ } catch { }
60
+ } , 10 * 1000 ) . unref ( )
52
61
} catch { }
53
62
return import ( '../dist/node/cli.js' )
54
63
}
You can’t perform that action at this time.
0 commit comments