You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📚 What are you trying to do? Please describe.
I have a Vue 3 web app that builds with Vite and want to draw in data from my Sanity graph. Vite is an ESM-only build system that doesn't know what require means, so it blows up when I try to use this lib to spin up the Sanity Client and fire the fetcher.
🔍 What have you tried?
I've tried cloning the next branch and changing the requires to imports. I'm not yet able to get it to build locally. It says it's missing lib/*. I can offer a more precise account of these attempts if helpful.
I have also tried to find a way to shoehorn Vite into CommonJS compatibility or interpreting requires, but that's a pretty strong nope.
ℹ️ Additional context
Sanity is awesome and I really appreciate you offering this library. Would be rad to get it integrated with Vite, cuz that's super fast.
The text was updated successfully, but these errors were encountered:
Thanks @krry. Just to update you, we're just waiting on vuejs/core#3070 to be merged for full ssr support. I've released a version with experimental Vite/Vue3 support that you can try by installing vue-sanity@vite but would value feedback/issues as I expect there will be some!
📚 What are you trying to do? Please describe.
I have a Vue 3 web app that builds with Vite and want to draw in data from my Sanity graph. Vite is an ESM-only build system that doesn't know what
require
means, so it blows up when I try to use this lib to spin up the Sanity Client and fire the fetcher.🔍 What have you tried?
I've tried cloning the next branch and changing the requires to imports. I'm not yet able to get it to build locally. It says it's missing
lib/*
. I can offer a more precise account of these attempts if helpful.I have also tried to find a way to shoehorn Vite into CommonJS compatibility or interpreting requires, but that's a pretty strong nope.
ℹ️ Additional context
Sanity is awesome and I really appreciate you offering this library. Would be rad to get it integrated with Vite, cuz that's super fast.
The text was updated successfully, but these errors were encountered: