From 2a79e5fb336de2379f37d38731ee60c271c75f26 Mon Sep 17 00:00:00 2001 From: Vladimir Sheremet Date: Tue, 30 Aug 2022 10:18:12 +0300 Subject: [PATCH] feat: always apply custom conditions --- packages/vitest/src/node/pool.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vitest/src/node/pool.ts b/packages/vitest/src/node/pool.ts index 6b0d6e07d9d0..fe90544eeec5 100644 --- a/packages/vitest/src/node/pool.ts +++ b/packages/vitest/src/node/pool.ts @@ -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, @@ -48,9 +48,9 @@ export function createPool(ctx: Vitest): WorkerPool { suppressLoaderWarningsPath, '--experimental-loader', loaderPath, - ...conditions || [], + ...conditions, ] - : [], + : conditions, } if (ctx.config.isolate) {