veaury
veaury copied to clipboard
Nuxt 3: Objects are not valid as a React child
Even with SSR disabled, the same error Objects are not valid as a React child
appears in Nuxt 3 projects using Veaury. Is there a minimal working Nuxt 3 template project available somewhere?
Hey! Faced the same problem, and I think I figured this out. The problem is veaury initialized vite vue plugin inside veauryVitePlugins function, and Nuxt 3 do the same under the hood. I don't know exactly how, but seems they are conflicting. The vite vue plugin is the first element of the array which is returned by veauryVitePlugins function. The solution is simple, just to remove first element of the array and then pass it to the vite plugins.
// nuxt.config.ts
import veauryVitePlugins from 'veaury/vite/index.js'
const veaury = veauryVitePlugins({
type: 'vue',
});
veaury.shift();
...
vite: {
plugins: [
veaury
],
...
},
...