diff --git a/package-lock.json b/package-lock.json index 72363ad..3bd5a2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,6 @@ "@types/node": "^24.0.0", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", - "@vitejs/plugin-react": "^6.1.0", "dotenv": "^17.2.0", "drizzle-kit": "^0.31.4", "jsdom": "^30.0.1", @@ -4255,36 +4254,6 @@ "integrity": "sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==", "license": "ISC" }, - "node_modules/@vitejs/plugin-react": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-react/-/plugin-react-6.1.0.tgz", - "integrity": "sha512-qd2BzUBehkov86WFhg0JkEFEYyCLG9uPCe6qWTY/kRlss9OvJrOF2UbIWT7p+8IzZHkEu0DNGHc4HSv+JdDLsw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rolldown/pluginutils": "^1.0.1" - }, - "engines": { - "node": "^20.19.0 || >=22.12.0" - }, - "peerDependencies": { - "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", - "babel-plugin-react-compiler": "^1.0.0", - "oxc-transform-react": "^0.145.0", - "vite": "^8.0.0" - }, - "peerDependenciesMeta": { - "@rolldown/plugin-babel": { - "optional": true - }, - "babel-plugin-react-compiler": { - "optional": true - }, - "oxc-transform-react": { - "optional": true - } - } - }, "node_modules/@vitest/expect": { "version": "4.1.11", "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-4.1.11.tgz", diff --git a/package.json b/package.json index e0ba3c7..c899719 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "@types/node": "^24.0.0", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", - "@vitejs/plugin-react": "^6.1.0", "dotenv": "^17.2.0", "drizzle-kit": "^0.31.4", "jsdom": "^30.0.1", diff --git a/vitest.config.ts b/vitest.config.ts index 71620f0..8908ca6 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,11 +1,10 @@ import path from "node:path"; -import react from "@vitejs/plugin-react"; import { defineConfig } from "vitest/config"; // xuchao: Vitest 配置——@ 别名对齐 tsconfig;组件测试文件用 // @vitest-environment jsdom 标注 export default defineConfig({ - plugins: [react()], resolve: { alias: { "@": path.resolve(__dirname, "src") } }, + oxc: { jsx: { runtime: "automatic" } }, test: { environment: "node", include: ["src/**/*.test.{ts,tsx}"],