0👍
✅
the routes array that you build doesn’t contains your routes objects.
It’s an array of promises.
you should do something like
Promise.all(routes).then(resolvedRoutes => {
this.$router.addRoutes(resolvedRoutes)
})
Source:stackexchange.com