Vben Migrate to Vben5
November 24, 2024Less than 1 minute
Introduction
This tutorial explains how to migrate the backend of vben2 to vben5.
Preparation
- goctls >= v1.6.18
- Goland plugin >= 0.2.3
Migration Steps
Convert Internationalization Files Convert the internationalization files in the locales folder from ts format to Json format.
Generate Backend Interface Code Using the goctls frontend vben5 Command
Use the goctls frontend vben5 command to generate api, locales, and views files.
Manually Adjust the Configuration within the Schema to Match the Original vben2 Project
Overwrite the Files Generated by goctls with the Converted Internationalization Files
Add a Prefix to the Proxy in vite.config.ts
Organize the Format of the Generated Code Files
Warning
- The menus in vben5 must be placed under the directory. Therefore, the scheduled task menu and your own root directory menu need to be moved under the directory menu.
- The rules validation rules in vben5 have been changed and need to be manually confirmed.
- Currently, the generation in vben5 only supports the modification window of modal type.