The error message is as follows:
Critical dependency: the request of a dependency is an expression
The routing code is as follows:
routes: [
{
path: '/login',
name: 'login',
component: resolve => require(['./../views/login/login.vue', resolve])
},
{
path: '/404',
name: '404',
component: resolve => require(['./../views/404.vue', resolve])
}
]
I have written this before, but this has never happened. Please solve it
There is indeed nothing wrong with writing it this way. It may be that the warning mechanism has been changed in the version update.
Expressions can be made into constants for easy reading and modification