Open kcy1860 opened 1 month ago
Yeah, that's a bit of a weird issue, that irritatingly only shows up in specific bundler combinations used by Next.js (not for all kinds of builds).
We are planning to drop the SuperJSON dependency completely, as it adds way too much bundle size and bloats the transported data unneccessarily - you can subscribe to https://github.com/apollographql/apollo-client-nextjs/issues/209 to track that.
hi, news about this?
@elmaedesistemas We will handle that in about two releases (targeting 0.11, with 0.9 hopefully going out today or tomorrow).
That said, our package allows for usage with both superjson 1 and 2, and you can configure your package.json
to explicitly use one of them over the other (npm: overrides
, yarn: resolutions
).
Hi Maintainers,
I'm running into
ERR_REQUIRE_ESM
error when using it in my Next.js api route to load data (unhandledRejection: Error [ERR_REQUIRE_ESM]: require() of ES Module
).The issue seemed to be tied with
[superjson ^2.0.0](https://github.com/blitz-js/superjson/releases)
where it introduced a new change to make it ESM only:=============================================
I have worked around the issue by manually setting
superjson
version to 1.13.3 but just thought I should raise it here that the version specification should probably not include^2.0.0
until it loads the module in ESM format.Thanks for your attention