SKUPLE
SKUPLE
NNuxt
Created by SKUPLE on 6/6/2024 in #❓・help
useFetch in error.vue (SSG)
Hey everyone, I couldn’t find any example or anything on the docs regarding this, but I’m trying to have 2 useFetch on my error.vue. Everything looks fine locally or SSR but in SSG (with appManifest) it tries to call useFetch instead of using an existing payload this fails the request because there is no server in our SSG app. Anyone has faced something similar or knows why this is happening?
2 replies
NNuxt
Created by SKUPLE on 4/15/2024 in #❓・help
Logs JSON Format
Hey everyone, In nuxt 2 we used to be able to call consola.setReporters on nuxt.config.ts to set a custom reporter. However, in nuxt 3 it doesn't seem to work and it's ignored. Has anyone been able to use json logs for nuxt 3?
1 replies
NNuxt
Created by SKUPLE on 3/14/2024 in #❓・help
Dynamic Components Nuxt 3 vs Vue
Hey everyone, I’m doing a nuxt 2 > nuxt 3 migration where we have a component library with most of our components. In that library I just maintain the compatibility between vue 2 and vue 3, most of the things are working. However, there is a weird behaviour where dynamic components (with mixed usage between custom components and native elements) seem to only work on SSR. Meaning that in some cases when initially loaded everything seems fine but then navigating to another page and coming back it doesn’t render the dynamic component. I searched the docs and Nuxt now recommends the usage of resolveComponent however I can’t really use it since I need to maintain vue 2 and vue 3 plus storybook (vue 2). I just wanted to ask for a few more examples on dynamic components without resolveComponent since that function isn’t native from Vue. I have tried with just passing the name of the component as a string (works fine on nuxt 2) and also tried passing the component itself. Removing dynamic components and using a bunch of v-if/else makes the whole behaviour disappear and everything seems correct.
5 replies