You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the routes callback as described in the documentation.
Is there a way to resolve named routes instead of hardcoding the path?
I wish we could do something like so:
// nuxt.config.jsconstaxios=require('axios'){sitemap: {asyncroutes()=>{const{ data }=awaitaxios.get('https://jsonplaceholder.typicode.com/users')returndata.map((user)=>this.$router.resolve({name: 'user',params: {id: user.id}}).href}}}
Unfortunately, this value is undefined.
Is there a way to make it point to the Nuxt instance?
I'm guessing the answer is no since it would solve #25 as well...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm using the
routes
callback as described in the documentation.Is there a way to resolve named routes instead of hardcoding the path?
I wish we could do something like so:
Unfortunately,
this
value isundefined
.Is there a way to make it point to the Nuxt instance?
I'm guessing the answer is no since it would solve #25 as well...
Best regards,
Benoit
Beta Was this translation helpful? Give feedback.
All reactions