We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__dirname
1 parent ea195e7 commit 32843ffCopy full SHA for 32843ff
packages/rtk-query-codegen-openapi/vitest.config.mts
@@ -1,14 +1,19 @@
1
import path from 'node:path';
2
+import { fileURLToPath } from 'node:url';
3
import { defineConfig } from 'vitest/config';
4
5
+// No __dirname under Node ESM
6
+const __filename = fileURLToPath(import.meta.url);
7
+const __dirname = path.dirname(__filename);
8
+
9
export default defineConfig({
10
test: {
11
pool: 'typescript',
12
globals: true,
13
setupFiles: ['./test/vitest.setup.ts'],
14
alias: {
- '@': path.join(import.meta.dirname, 'test/fixtures'),
- '@rtk-query/codegen-openapi': path.join(import.meta.dirname, 'src'),
15
+ '@': path.join(__dirname, 'test/fixtures'),
16
+ '@rtk-query/codegen-openapi': path.join(__dirname, 'src'),
17
},
18
19
});
0 commit comments