From 7c771316210f29f35e78b8777fdddbc56b5c4c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Louren=C3=A7o?= Date: Sat, 9 Nov 2024 23:02:25 -0300 Subject: [PATCH] fix(perf): enable compile cache --- lib/cli.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cli.js b/lib/cli.js index e11729fe3205b..00b4fc0bd7fb7 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -1,3 +1,11 @@ +try { + const { enableCompileCache } = require('node:module') + /* istanbul ignore next */ + if (enableCompileCache) { + enableCompileCache() + } +} catch (e) { /* istanbul ignore next */ } + const validateEngines = require('./cli/validate-engines.js') const cliEntry = require('node:path').resolve(__dirname, 'cli/entry.js')