fix weird vite 7 error

This commit is contained in:
Nate Kelley 2025-07-23 15:57:44 -06:00
parent 587eda43d0
commit 0601a3cd09
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 6 additions and 4 deletions

View File

@ -1,11 +1,12 @@
import { loadEnv } from 'vite';
import { defineConfig } from 'vitest/config';
import type { Plugin, ViteUserConfig } from 'vitest/config';
export const baseConfig = defineConfig(async () => {
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');
return {
plugins: [tsconfigPaths()],
plugins: [tsconfigPaths() as unknown as Plugin],
test: {
include: ['**/*.test.ts', '**/*.spec.ts'],
exclude: ['**/node_modules/**', '**/dist/**', '**/build/**'],
@ -20,5 +21,5 @@ export const baseConfig = defineConfig(async () => {
},
},
},
};
} satisfies ViteUserConfig;
});

View File

@ -1,11 +1,12 @@
import { loadEnv } from 'vite';
import { defineConfig } from 'vitest/config';
import type { Plugin, ViteUserConfig } from 'vitest/config';
export const uiConfig = defineConfig(async () => {
const { default: tsconfigPaths } = await import('vite-tsconfig-paths');
return {
plugins: [tsconfigPaths()],
plugins: [tsconfigPaths() as unknown as Plugin],
test: {
include: ['**/*.test.ts', '**/*.spec.ts'],
exclude: ['**/node_modules/**', '**/dist/**', '**/build/**'],
@ -21,5 +22,5 @@ export const uiConfig = defineConfig(async () => {
},
},
},
};
} satisfies ViteUserConfig;
});