I have routes, which depend on domain of the site.
Previously I used extendRoutes
. Now, I can't use it, because I use the one copy for different domains.
I have tried use router.addRoute
in nuxtServerInit and in the middleware, but didn't work.
const routes = app.router.getRoutes();
const { components } = routes.find(route => route.path === '/about')
app.router.addRoute({
path: '/about-test',
name: 'about111',
component: components['default']
});