Upgrading umijs 3 to 4
This article documents the complete process and insights gained from upgrading the frontend framework of a legacy project from UmiJS 3 to UmiJS 4. The upgrade aims to address low development efficiency, clean up redundant code and libraries, and strengthen engineering standards such as TypeScript and ESLint. The author adopted a strategy of creating a new UmiJS 4 project and gradually migrating code, ensuring functionality stability before merging back into the original project. Specific changes include: replacing configurations with @umijs/max, removing dependencies on webpack-chain, proxy, and mock; rewriting the permission system to support dynamic routing and menus; refactoring class components into function components and introducing Hooks; updating Ant Design to the latest version and removing Less dependencies; deprecating umi-request in favor of axios; and adjusting tsconfig and internationalization configurations. Although specific errors were not detailed in this record, compatibility issues were successfully resolved through official documentation and community assistance, providing a practical reference for similar project upgrades.