Skip to content

Commit 98be5cd

Browse files
committed
refactor: convert vitest.config to async configuration loading
1 parent 14411c7 commit 98be5cd

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

backend/vitest.config.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { defineConfig } from 'vitest/config';
2-
import tsconfigPaths from 'vite-tsconfig-paths';
32

4-
export default defineConfig({
5-
plugins: [tsconfigPaths()],
6-
test: {
7-
globals: true,
8-
environment: 'node',
9-
include: ['**/*.spec.ts'],
10-
coverage: {
11-
reporter: ['text', 'json', 'html'],
3+
export default defineConfig(async () => {
4+
const tsconfigPaths = (await import('vite-tsconfig-paths')).default;
5+
6+
return {
7+
plugins: [tsconfigPaths()],
8+
test: {
9+
globals: true,
10+
environment: 'node',
11+
include: ['**/*.spec.ts'],
12+
coverage: {
13+
reporter: ['text', 'json', 'html'],
14+
},
1215
},
13-
},
14-
});
16+
};
17+
});

0 commit comments

Comments
 (0)