Replies: 1 comment
-
@Andarist has figured this one out and fixed it with this PR - eslint seems to only shake on a per-file level and couldn't see a file as pure anymore: apollographql/apollo-client#11622 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there, I hope this is the right place to be asking this question :)
I'm currently working on some changes in Apollo Client, and it seems as a result one export is getting blown up, pulling in code that shouldn't be there - and looking at the result, I see code in there that is not exported and not referenced from anything that is exported.
So I thought I'd ask the exports: Why is
useSuspenseQuery
in this bundling result?This is the bundling configuration
Comparing that to the upstream package, I get this diff:
It seems that against better judgement, it's pulling this in:
and then everything trickles from there - although
useSuspenseQuery
is not referenced anywhere in the actually exported code.Really, though, I would expect a diff much more like this:
This is the PR adding that code:
apollographql/apollo-client#11617
The irritating thing here is that I've added this "wrapping" behaviour to five hooks, but only one of them doesn't shake out.
Am I missing something obvious here, or is this a quirk (or even bug) in esbuild?
Beta Was this translation helpful? Give feedback.
All reactions