diff --git a/federated-css/scripts/start-all.cjs b/federated-css/scripts/start-all.cjs index 332e84e1df..da6c0c3238 100644 --- a/federated-css/scripts/start-all.cjs +++ b/federated-css/scripts/start-all.cjs @@ -1,9 +1,16 @@ const { spawn } = require('node:child_process'); const waitOn = require('wait-on'); const path = require('node:path'); +const fs = require('node:fs'); const root = path.resolve(__dirname, '..'); +// Ensure v8 compile cache writes go to a local ignored folder instead of polluting +// sibling workspaces (corepack/pnpm relies on this cache under the hood). +const v8CacheDir = path.join(root, '.cache', 'v8-compile-cache'); +fs.mkdirSync(v8CacheDir, { recursive: true }); +process.env.V8_COMPILE_CACHE_CACHE_DIR = v8CacheDir; + function run(cmd, args) { return spawn(cmd, args, { stdio: 'inherit', cwd: root, shell: true }); }