Pascal Martineau
The CJS build of Vite's Node API is deprecated.
I've been using
vite-plugin-graphql-codegen
with Nuxt for quite some time and I started getting this warning lately.
My nuxt.config.ts looks like this:
The plugin itself seems to have the proper "type" / "exports" in package.json.
Any help or guidance would be greatly appreciated !1 replies
Hybrid rendering on Vercel and dynamic cart data from cookie
I'm trying to configure hybrid rendering on Vercel for a headless Shopify e-commerce site and I'm having trouble getting the cart item count to display correctly on pre-rendered pages.
The cart data comes from a composable that executes
const cart = useState('cart', () => cartCookie.value || cartDefault)
.
I tried wrapping the cart icon component inside <ClientOnly>
but the cart item count is always stale when the cache is hit.
Is the only / best solution to initialize the cart state inside onMounted
or am I missing something obvious ?1 replies