Skip to content

Commit f42deb9

Browse files
committed
Add path aliases for test imports in vitest config
1 parent e388366 commit f42deb9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vitest.config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
import path from 'node:path'
2+
13
import { defineConfig } from 'vitest/config'
24

35
export default defineConfig({
6+
resolve: {
7+
alias: {
8+
'../dist/index': path.resolve(__dirname, './src/index.ts'),
9+
'../dist/http-client.js': path.resolve(__dirname, './src/http-client.ts'),
10+
},
11+
},
412
test: {
513
globals: false,
614
environment: 'node',

0 commit comments

Comments
 (0)