Skip to content

Commit

Permalink
feat(worker): always apply custom resolver conditions (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Sep 4, 2022
1 parent 5bfd3c9 commit 58fe60b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vitest/src/node/pool.ts
Expand Up @@ -31,7 +31,7 @@ export function createPool(ctx: Vitest): WorkerPool {
const maxThreads = ctx.config.maxThreads ?? threadsCount
const minThreads = ctx.config.minThreads ?? threadsCount

const conditions = ctx.server.config.resolve.conditions?.flatMap(c => ['-C', c])
const conditions = ctx.server.config.resolve.conditions?.flatMap(c => ['-C', c]) || []

const options: TinypoolOptions = {
filename: workerPath,
Expand All @@ -48,9 +48,9 @@ export function createPool(ctx: Vitest): WorkerPool {
suppressLoaderWarningsPath,
'--experimental-loader',
loaderPath,
...conditions || [],
...conditions,
]
: [],
: conditions,
}

if (ctx.config.isolate) {
Expand Down

0 comments on commit 58fe60b

Please sign in to comment.