fix: update build and test scripts to set Rayon and Tokio worker threads
This commit is contained in:
1 parent
fb8e42f632
commit
d7b8a351c1
3 files changed
+14
-5
No files matched your search
@@ -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,
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user