N
Nuxtβ€’6mo ago
RedNova

Nuxt module define layout not working?

I recently updated my Nuxt project to version 3.12.1. In my Nuxt module, specifically in the playground page, I'm trying to define a custom layout. The layout file is available and it was working perfectly last week before the update. Now, however, the custom layout isn't working and default layout is used. Did I miss any changes or updates in this new version? Any help or guidance would be appreciated, as I'm not sure what might be going wrong.
No description
5 Replies
RedNova
RedNovaOPβ€’6mo ago
I also found out that when the module is used in a real nuxt 3 application. It also wont work. I also have another project from nuxt 3.11.2 and there it is working (logic is no diffrent)..
xibman
xibmanβ€’6mo ago
try to remove the import of definePageMeta (is autoimported by nuxt)e
RedNova
RedNovaOPβ€’6mo ago
Thanks but thats not it sadly. πŸ₯² My nuxt config has this off: imports: { autoImport: false, }, But even when removing definePageMeta it wont work. It will get the default layout anyway.
xibman
xibmanβ€’6mo ago
@RedNova can you try like this <script setup lang="ts"> definePageMeta({ layout: 'default' }) </script>
RedNova
RedNovaOPβ€’6mo ago
Nope 😦 still giving me default layout. I will try to downgrade to 3.12.0 if that is not working i will go back to 3.11.* Thanks for your help πŸ™‚ PS: not a single error in my console OMG i fixed it.... Noob mistake i guess. fix is run -> npx nuxi cleanup And problem is back today :(.. tried to run npx nuxi cleanup. But this time it wont fix the issue.
Want results from more Discord servers?
Add your server