From 7257a8878a424f15add8db4474e62e2b2ebd1a56 Mon Sep 17 00:00:00 2001 From: Fred <98240+farnoux@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:14:58 +0100 Subject: [PATCH] Fixe les alias d'import TS lors du run des tests --- backend/vitest.config.mts | 2 +- packages/api/vitest.config.mts | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/backend/vitest.config.mts b/backend/vitest.config.mts index fe1ceb5fb3..0a7f31124d 100644 --- a/backend/vitest.config.mts +++ b/backend/vitest.config.mts @@ -9,7 +9,7 @@ export default defineConfig(({ mode }) => ({ plugins: [ swc.vite({ tsconfigFile: './tsconfig.spec.json' }), - tsconfigPaths({ projects: ['./tsconfig.json'] }), + tsconfigPaths({ projects: ['../tsconfig.base.json'] }), ], test: { diff --git a/packages/api/vitest.config.mts b/packages/api/vitest.config.mts index 8f376f1538..d25e551e7d 100644 --- a/packages/api/vitest.config.mts +++ b/packages/api/vitest.config.mts @@ -1,18 +1,13 @@ /// -import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'; import { loadEnv } from 'vite'; +import tsconfigPaths from 'vite-tsconfig-paths'; import { defineConfig } from 'vitest/config'; export default defineConfig({ root: __dirname, cacheDir: '../../node_modules/.vite/packages/api', - plugins: [nxViteTsPaths()], - - // Uncomment this if you are using workers. - // worker: { - // plugins: [ nxViteTsPaths() ], - // }, + plugins: [tsconfigPaths({ projects: ['../../tsconfig.base.json'] })], test: { fileParallelism: false,