From a352c81876a04e5a6acf995854d028f705fc61f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Mon, 13 Jan 2025 17:37:20 +0100 Subject: [PATCH] fix(js): do not generate explicit vitest task config for a js library unless adding plugin is disabled (#29606) ## Current Behavior Generating a js library with any bundler other than `vite` and with the `vitest` test runner results in an explicit `test` task in the project configuration. ## Expected Behavior Generating a js library with any bundler other than `vite` and with the `vitest` test runner should not generate an explicit `test` task in the project configuration. The `test` task should be inferred. ## Related Issue(s) Fixes # --- packages/js/src/generators/library/library.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/js/src/generators/library/library.ts b/packages/js/src/generators/library/library.ts index 346e3621d1..9136578708 100644 --- a/packages/js/src/generators/library/library.ts +++ b/packages/js/src/generators/library/library.ts @@ -172,6 +172,7 @@ export async function libraryGeneratorInternal( testEnvironment: options.testEnvironment, runtimeTsconfigFileName: 'tsconfig.lib.json', compiler: options.compiler === 'swc' ? 'swc' : 'babel', + addPlugin: options.addPlugin, }); tasks.push(vitestTask); createOrEditViteConfig(