File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ function start() {
4949 try {
5050 // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
5151 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 ( )
5261 } catch { }
5362 return import ( '../dist/node/cli.js' )
5463}
You can’t perform that action at this time.
0 commit comments