To update the user routes, follow these instructions:
- Open the user.js file in the src/router folder.
- In each route that has a component property, we will transform the direct attribution of the component to a new function. This will be an arrow function returning the import() method of webpack:
{
path: '/user',
name: 'user',
component: () => import('@/views/user/Index.vue'),
meta: {
authenticated: true,
},
children: [],
},
- Repeat the process on each one of the route objects that has a component property.