Sun
How to avoid duplicated requests between the server side of two island components?
Hey,
I have 3 island components (I use the concept with .server.vue and .client.vue files by island component).
I want to fetch the same data from the 3 components, from server side.
I don't find the way to share the cache of a useAsyncData between all components, in server side.
Is useAsyncData the good way? Is there another way to share data and avoid multiple fetchs?
Thanks 🥲
5 replies
Island component: share server data to client side
Et there,
I need to implement a component with a server side data fetching. To ensure it, I found the concept of island components.
But, I don't find a way to share those data with a client's children (or a client part of the component?).
In the doc, I read this https://nuxt.com/docs/guide/directory-structure/components#paired-with-a-client-component but the usage of shared elements between .server and .client seems to be not documented yet...
Is it possible? How can I do it?
Many thanks in advance
6 replies
Teleport doesn't work with Nuxt Bridge
Hey,
The following features seams to not works in a Nuxt Bridge project: https://nuxt.com/docs/api/components/teleports
It's not specified in the documentation, so it's a bug ?
2 replies
How make the compartmentalization between Nuxt Bridge app and Nuxt 3 app in same pnpm monorepo ?
I say that because my Nuxt Bridge app try to load some Nuxt 3 dependancies:
... .pnpm/@[email protected]/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1 replies
Create UI components for both Nuxt 2 and Nuxt 3
Hey
I have a monorepo with Nuxt 3 and Nuxt 2 apps, i want to share some UI components.
Is there a way to create a components library for Nuxt 2 AND Nuxt 3 application ?
With Nuxt Bridge ? Or in simple Vue project ?
Thanks a lot by advance 🙏 I will create and share à simple exemple of the solution in Github to help the next Guy who stucked by this problem.
3 replies
Impossible to have Nuxt 2 app and Nuxt 3 app in same monorepo
Hey,
I'm working on a monorepo (with turborepo) of a big project using Nuxt 2 as web interface.
I need to create a second web app which using Nuxt 3 but i can't start this app in the monorepo, i got this error when i try to install the project (
pnpm i
at root):
I think the problem is because the root node_modules is shared.
I just pushed a simple version of my project here which reproduce the problem:
https://github.com/Suniron/monorepo-nuxt2-nuxt3-problem2 replies