- 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.
3.8 KiB
3.8 KiB
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.htmlsrc/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/*, orsrc/i18n/locales/*.- active runtime callers now use
@runtime/* -> runtime-shared/*
- active runtime callers now use
- 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-requestoutput tosrc/api - added
src/api/request.tsas the React-side generated request bridge
- removed
- 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, includingsrc/main.tsandsrc/framework.ts
- deleted
- 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
- removed
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.jsonif the repo standardizes onpnpmonly - 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
- Done: remove low-risk compatibility items from
package.jsonandglobal.d.ts - Done: remove the dead Vue bootstrap chain
- Done: remove the dead Vue page/component/store/request tree
- Done: delete
src/main.ts,src/framework.ts, and the remaining deadsrc/**files - Done: trim stale TypeScript/Vite/OpenAPI alias surface that pointed into deleted legacy areas
- 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.jsonstill contains historical Vue-era entries, but the active workspace lockfile ispnpm-lock.yaml.
Next Gate
Vue exit is effectively complete for source/runtime once all of the following remain true:
- no source file imports any Vue-era runtime package
package.jsonstays free of the Vue-era dependencies andpnpm-lock.yamlstays refreshed- Vite/TypeScript/OpenAPI config stays off
src/** pnpm typecheckandpnpm build:vitestay green