Closed nonehub closed 1 month ago
This happens without i18n as well, you'll have to pass meta like so:
'pages:extend'(pages) {
pages.push({
name: `testExtend`,
path: `/testExtend`,
meta: { layout: 'trans' },
file: '~/pages/test.vue',
});
},
Not sure if definePageMeta
should work on pages added this way, I suggest opening an issue on the Nuxt repo if that is the expected behavior.
This happens without i18n as well, you'll have to pass meta like so:
'pages:extend'(pages) { pages.push({ name: `testExtend`, path: `/testExtend`, meta: { layout: 'trans' }, file: '~/pages/test.vue', }); },
Not sure if
definePageMeta
should work on pages added this way, I suggest opening an issue on the Nuxt repo if that is the expected behavior.
sorry, thanks
Environment
Build Modules: -
Reproduction
https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-jskhtw?file=pages%2Ftest.vue
Describe the bug
When I add a page using hooks pages:extend:
i18n changes the layout to the default, even though on the same page it was not the default..
try open
/test
and/testExtend
They are the same file https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-jskhtw?file=pages%2Ftest.vue/test :
/testExtend
Additional context
No response
Logs
No response