-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(react-urql): Import error in Node.js ESM mode #2484
Comments
urql has full ESM support in both export maps as well as not using require in the mentioned packages when using the proper export maps/.... Makes me wonder if it's the |
Thanks @JoviDeCroock for the answer. The vite-plugin-ssr test suite tests a lot of integration, and only |
I mean, I just tried vite locally in our examples while doing those tests which did seem to all work correctly so I think it's something when we are in node-resolution land |
Yes, |
It's worth reminding ourselves that Object.keys(e).forEach((function(t) {
if ("default" !== t && !exports.hasOwnProperty(t)) {
exports[t] = e[t];
}
})); So, probably worth looking into why Node's esm loader doesn't like this when it has to switch back to CommonJS. Likely because it only does a naïve check? Edit: My first thought here after browsing was that |
urql version:
2.2.1
.Steps to reproduce
See https://github.com/brillout/urql-vite3.
Expected behavior
No import error.
Actual behavior
Import error. Note that
useQuery
can be imported whilegql
cannot. It seems to be a problem onurql
's side.The text was updated successfully, but these errors were encountered: