diff --git a/app/game-engine/package.json b/app/game-engine/package.json index 7f61ae2..5e04628 100644 --- a/app/game-engine/package.json +++ b/app/game-engine/package.json @@ -16,6 +16,7 @@ }, "devDependencies": { "tsdown": "^0.18.3", + "vite-tsconfig-paths": "^4.3.2", "vitest": "^4.0.16" } } diff --git a/app/game-engine/vitest.config.ts b/app/game-engine/vitest.config.ts index 5c63f1e..400c273 100644 --- a/app/game-engine/vitest.config.ts +++ b/app/game-engine/vitest.config.ts @@ -1,6 +1,14 @@ +import path from 'node:path'; + import { defineConfig } from 'vitest/config'; +import tsconfigPaths from 'vite-tsconfig-paths'; export default defineConfig({ + plugins: [ + tsconfigPaths({ + projects: [path.resolve(__dirname, '../../tsconfig.paths.json')], + }), + ], test: { environment: 'node', globals: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 722657a..8d88dc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,6 +36,9 @@ importers: tsdown: specifier: ^0.18.3 version: 0.18.3(typescript@5.9.3) + vite-tsconfig-paths: + specifier: ^4.3.2 + version: 4.3.2(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.27)) vitest: specifier: ^4.0.16 version: 4.0.16(@types/node@20.19.27)