Vue-router dynamic routing lazy loading slow local hot updates

because the project routes are all dynamically infected by the back end, the local route storage is not done,
addRoute is dynamically mounted, and then lazy loading

is used.

clipboard.png


clipboard.png
how should I configure so that lazy loading is not used in the development environment


judge whether to load lazily according to proccess.env.NODE_ENV .

lazy loading is recommended to be configured in router, which has been tried by the project before, and it is possible to package multiple js files eventually. And the hot update of the modified code is not slow:

const Login = resolve => require(['../pages/Login.vue'], resolve)
Menu