diff --git a/vitest.config.ts b/vitest.config.mts similarity index 90% rename from vitest.config.ts rename to vitest.config.mts index 0c80c9703d..0a8b4c426d 100644 --- a/vitest.config.ts +++ b/vitest.config.mts @@ -1,6 +1,6 @@ import path from 'path'; import { defineConfig } from 'vitest/config'; -import { InlineConfig } from 'vitest'; +import { InlineConfig } from 'vitest/node'; // 单元测试相关配置 const testConfig: InlineConfig = { @@ -11,8 +11,8 @@ const testConfig: InlineConfig = { globals: true, environment: 'jsdom', testTimeout: 16000, - transformMode: { - web: [/\.[jt]sx$/], + testTransformMode: { + web: ['\\.[jt]sx$'], }, coverage: { provider: 'istanbul',