diff --git a/packages/core/bin/rsbuild.js b/packages/core/bin/rsbuild.js index 71983da34..a77cc2283 100755 --- a/packages/core/bin/rsbuild.js +++ b/packages/core/bin/rsbuild.js @@ -3,9 +3,8 @@ import nodeModule from 'node:module'; // enable on-disk code caching of all modules loaded by Node.js // requires Nodejs >= 22.8.0 -// @ts-expect-error enableCompileCache is not typed in `@types/node` 18.x const { enableCompileCache } = nodeModule; -if (enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) { +if (enableCompileCache) { try { enableCompileCache(); } catch {