Migrating from v1 to v2
Breaking Changes
- Minimum Node.js is now 22.12; builds use Vite 8 and Rolldown.
- Login moved from
/api/loginto/api/auth/login. - Requests use
src/api/client.tsplussrc/api/modules;utils/requestis a compatibility re-export only. VITE_USE_PWAbecameVITE_PWA_ENABLED.- Three simultaneous UI resolvers became one
VITE_UI_FRAMEWORKselection. - Token persistence moved from
localStoragetosessionStorage. - Main route names/navigation became Home / Examples / AI / Member.
Migration Steps
- Upgrade Node/pnpm and run
pnpm install. - Migrate environment values from
.env.exampleand select a UI framework. - Move direct Axios calls into
src/api/modulesand adoptApiError. - Move remote lists/details from Pinia to TanStack Query.
- Replace
openapi/schema.yamland runpnpm api:generate. - Move product SVGs to
src/assets/iconsand extendSvgIconName. - Review custom route meta, permissions, and login redirects.
- Run
pnpm checkand relevantpnpm test:e2escenarios.
Old Implementations Not Restored
The old vite-plugin-pages integration was not restored because implicit routing does not pay off at this scale. The imagemin binary chain was replaced by Sharp/SVGO. Icon fonts were replaced by SVG sprites. QRCode/restart plugins were removed due to Vite 8 peer incompatibility; Vite reloads config itself, and device testing can use the LAN URL or a future CLI.