fix: update build and test scripts to set Rayon and Tokio worker threads

This commit is contained in:
spaghet committed 2026-11-13 01:43:07 -05:00
1 parent fb8e42f632
commit d7b8a351c1
3 files changed
+14 -5

No files matched your search

+9
View File
@@ -23,5 +23,14 @@ export default defineConfig({
test: {
environment: "node",
include: ["src/**/__tests__/**/*.test.ts", "src/**/*.test.ts"],
// Rolldown (Vite 8's bundler, loaded when Vitest reads this config) sizes
// its native thread pool to `nproc`. On hosts that report many CPUs but
// cannot actually spawn that many threads, the default `forks` pool aborts
// with "spawn node EAGAIN". The `threads` pool with a single worker avoids
// forking one child process per file; the matching RAYON/TOKIO caps live in
// the package.json scripts.
pool: "threads",
maxWorkers: 1,
fileParallelism: false,
},
})