File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { defineConfig } from 'vitest/config'
2
2
3
+ import path from 'node:path'
4
+ import { fileURLToPath } from 'node:url'
5
+
6
+ // No __dirname under Node ESM
7
+ const __filename = fileURLToPath ( import . meta. url )
8
+ const __dirname = path . dirname ( __filename )
9
+
3
10
export default defineConfig ( {
4
11
test : {
5
12
globals : true ,
6
13
include : [ './test/**/*.(spec|test).[jt]s?(x)' ] ,
7
14
alias : {
8
- redux : './src/index.ts' , // @remap -prod-remove-line
15
+ redux : path . join ( __dirname , './src/index.ts' ) , // @remap -prod-remove-line
9
16
10
17
// this mapping is disabled as we want `dist` imports in the tests only to be used for "type-only" imports which don't play a role for jest
11
- '@internal/ ' : './ src/'
18
+ '@internal' : path . join ( __dirname , ' src' )
12
19
}
13
20
}
14
21
} )
You can’t perform that action at this time.
0 commit comments