I'm using nuxt-i18n and @nuxtjs/auth and I want to config the auth.redirect
option to support i18n like this:
// nuxt.config.js
export default {
modules: [
'@nuxtjs/auth',
'nuxt-i18n',
// ...
],
auth: {
redirect: {
home: localePath('/dashboard'),
// ...
},
},
// ...
};
Normally, just like this.$store
, I can access that localePath
function provided by nuxt-i18n through app instance or the context
like this.$localePath
or app.localePath
. But how can use it inside the nuxt.config.js
file?