Open huang-julien opened 1 year ago
Related: #1676
// router.options.ts
import type { RouterConfig } from '@nuxt/schema'
import { localizeRoutes, type I18nRoutingOptions } from 'vue-i18n-routing'
import type { RouteRecordRaw } from 'vue-router'
import { nuxtI18nOptions } from '#build/i18n.options.mjs'
export default {
routes: _routes =>
localizeRoutes(
[
{
name: 'Home',
path: '/',
component: () => import('@/pages/home/page.vue'),
},
{
name: 'About',
path: '/about',
component: () => import('@/pages/about/page.vue'),
},
],
nuxtI18nOptions satisfies I18nRoutingOptions
) as RouteRecordRaw[],
} satisfies RouterConfig
Describe the feature
Hi :wave:
Currently the module only generate routes with the page directory. Is it possible to add a routes or router option to generate localized routes instead of using the page directory ?
Additional information
Final checks