- Updated `generateUUID` function for improved readability and performance. - Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed. - Simplified TypeScript configuration by removing unnecessary paths and aliases. - Enhanced Vite configuration for better project structure and maintainability.
107 lines
3.8 KiB
Markdown
107 lines
3.8 KiB
Markdown
# zn-ai Vue Exit Checklist
|
|
|
|
Goal: move `zn-ai` from "React renderer plus leftover Vue-era assets/config" to a truly `React-only` repo, while keeping build and typecheck green at each step.
|
|
|
|
## Current Status
|
|
|
|
- Renderer bootstrap is React-only.
|
|
- `index.html`
|
|
- `src/main.tsx`
|
|
- `src/**` is now the active React renderer tree and no longer reaches back into the removed Vue code.
|
|
- Electron/shared runtime no longer imports from `src/lib/*`, `src/shared/*`, or `src/i18n/locales/*`.
|
|
- active runtime callers now use `@runtime/* -> runtime-shared/*`
|
|
- Legacy compatibility/config cleanup is complete.
|
|
- removed `@vitejs/plugin-vue`
|
|
- removed `unplugin-auto-import`
|
|
- removed Vue module declarations from `global.d.ts`
|
|
- removed stale `src/**` path aliases from Vite and TypeScript
|
|
- moved `openapi-ts-request` output to `src/api`
|
|
- added `src/api/request.ts` as the React-side generated request bridge
|
|
- The old Vue tree is gone end-to-end.
|
|
- deleted `src/main-vue.ts`
|
|
- deleted `src/router/index.ts`
|
|
- deleted `src/permission.ts`
|
|
- deleted `src/App.vue`
|
|
- deleted the remaining `src/**` directory, including `src/main.ts` and `src/framework.ts`
|
|
- Vue-era runtime dependencies are gone from `package.json`.
|
|
- removed `vue`
|
|
- removed `pinia`
|
|
- removed `vue-router`
|
|
- removed `element-plus`
|
|
- removed `vue-i18n`
|
|
- removed `@remixicon/vue`
|
|
- removed `@lucide/vue`
|
|
- removed `vue-codemirror`
|
|
- removed `vue-markdown-render`
|
|
- removed `@vueuse/core`
|
|
|
|
## What This Means
|
|
|
|
- The old Vue runtime path is no longer present in the source tree.
|
|
- `src/**` is no longer a live runtime or config boundary.
|
|
- The remaining follow-up is mostly housekeeping, not migration-blocking runtime work.
|
|
- stale historical references in docs
|
|
- optional cleanup of `package-lock.json` if the repo standardizes on `pnpm` only
|
|
- the known bytecode warning when the local Electron binary is missing
|
|
|
|
## File Plan
|
|
|
|
### 1. `package.json`
|
|
|
|
#### Done
|
|
|
|
- removed the Vue-era runtime/UI dependencies from the manifest
|
|
- refreshed `pnpm-lock.yaml`
|
|
|
|
### 2. `global.d.ts`
|
|
|
|
#### Done
|
|
|
|
- removed `declare module "@stores/*";`
|
|
- removed `declare module "@service/*";`
|
|
- removed `declare module "@utils/*";`
|
|
- removed `declare module "@constant/*";`
|
|
- removed `declare module "vue-router";`
|
|
- removed `declare module "*.vue"`
|
|
- removed `declare module "@remixicon/vue"`
|
|
- removed `declare module "@assets/images/*"`
|
|
|
|
### 3. `tsconfig.app.json`
|
|
|
|
#### Done
|
|
|
|
- removed explicit include for `src/permission.ts`
|
|
- removed `include: "src/**/*.vue"`
|
|
- removed the remaining dead `src/**` path aliases
|
|
|
|
### 4. `vite.config.ts`
|
|
|
|
#### Done
|
|
|
|
- active renderer build is React-only
|
|
- Electron shared runtime uses `@runtime/*`
|
|
- removed the legacy `src/**` alias surface from the Vite config
|
|
|
|
## Recommended Execution Order
|
|
|
|
1. Done: remove low-risk compatibility items from `package.json` and `global.d.ts`
|
|
2. Done: remove the dead Vue bootstrap chain
|
|
3. Done: remove the dead Vue page/component/store/request tree
|
|
4. Done: delete `src/main.ts`, `src/framework.ts`, and the remaining dead `src/**` files
|
|
5. Done: trim stale TypeScript/Vite/OpenAPI alias surface that pointed into deleted legacy areas
|
|
6. Done: remove the remaining Vue-era dependencies from `package.json`
|
|
|
|
## Residual Notes
|
|
|
|
- Keep `@runtime/* -> runtime-shared/*`, which is now the active Electron/shared-runtime boundary.
|
|
- `package-lock.json` still contains historical Vue-era entries, but the active workspace lockfile is `pnpm-lock.yaml`.
|
|
|
|
## Next Gate
|
|
|
|
Vue exit is effectively complete for source/runtime once all of the following remain true:
|
|
|
|
1. no source file imports any Vue-era runtime package
|
|
2. `package.json` stays free of the Vue-era dependencies and `pnpm-lock.yaml` stays refreshed
|
|
3. Vite/TypeScript/OpenAPI config stays off `src/**`
|
|
4. `pnpm typecheck` and `pnpm build:vite` stay green
|