feat(react19-migration): 阶段1 - 项目基础设施重建

- T1.1: 卸载 Vue 依赖,安装 React 19 + Ant Design 5 + Zustand 5 + AntV 全家桶
- T1.2: Vite 配置迁移 (plugin-vue → plugin-react, manualChunks 更新)
- T1.3: TypeScript 配置迁移 (jsx: preserve → react-jsx, 移除 .vue)
- T1.4: ESLint 配置迁移 (Vue 规则 → React/Hooks/Refresh 规则)
- T1.5: 入口文件迁移 (main.ts → main.tsx, App.vue → App.tsx, div#app → div#root)

验证: npm run dev 成功启动空白 React 应用
This commit is contained in:
张翔
2026-05-03 15:14:24 +08:00
committed by zhangxiang
parent 7ba9d32a31
commit e4111ddb1a
16 changed files with 6973 additions and 1527 deletions
+29 -18
View File
@@ -7,9 +7,9 @@
"dev": "vite",
"dev:local": "vite --mode development-local",
"dev:test": "vite --mode test",
"build": "vue-tsc && vite build",
"build:test": "vue-tsc && vite build --mode test",
"build:prod": "vue-tsc && vite build --mode production",
"build": "tsc --noEmit && vite build",
"build:test": "tsc --noEmit && vite build --mode test",
"build:prod": "tsc --noEmit && vite build --mode production",
"preview": "vite preview",
"test": "vitest --run",
"test:ui": "vitest --ui",
@@ -29,41 +29,52 @@
"test:parallel-opt": "playwright test parallel-optimization.spec.ts",
"test:all-opt": "playwright test edge-cases.spec.ts performance-optimization.spec.ts parallel-optimization.spec.ts",
"test:monitor": "node e2e/performanceMonitor.js report",
"type-check": "vue-tsc --noEmit",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx --fix --ignore-path .gitignore",
"type-check": "tsc --noEmit",
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx --fix --ignore-path .gitignore",
"format": "prettier --write src/"
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.2",
"axios": "^1.6.2",
"@ant-design/icons": "^6.2.2",
"@ant-design/pro-components": "^2.8.10",
"@antv/g2": "^5.4.8",
"@antv/g6": "^5.1.0",
"@antv/l7": "^2.25.4",
"@antv/l7-maps": "^2.25.4",
"@antv/s2": "^2.7.0",
"antd": "^5.29.3",
"axios": "^1.16.0",
"crypto-js": "^4.2.0",
"date-fns": "^4.1.0",
"dayjs": "^1.11.10",
"element-plus": "^2.13.5",
"jwt-decode": "^4.0.0",
"pinia": "^3.0.4",
"vue": "^3.5.26",
"vue-i18n": "^9.8.0",
"vue-router": "^4.6.4"
"react": "^19.2.5",
"react-dom": "^19.2.5",
"react-router": "^7.14.2",
"zustand": "^5.0.12"
},
"devDependencies": {
"@playwright/test": "^1.40.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/crypto-js": "^4.2.2",
"@types/node": "^20.10.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vitejs/plugin-vue": "^6.0.3",
"@vitejs/plugin-react": "^5.2.0",
"@vitest/coverage-v8": "^4.1.1",
"@vitest/ui": "^4.0.16",
"@vue/test-utils": "^2.4.3",
"eslint": "^8.56.0",
"eslint-plugin-vue": "^9.19.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.4.26",
"jsdom": "^27.4.0",
"prettier": "^3.1.1",
"terser": "^5.46.1",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vitest": "^4.0.16",
"vue-tsc": "^3.2.2"
"vitest": "^4.0.16"
}
}
}