Closed arminh closed 1 year ago
Hello, @arminh. I am unable to reproduce the problem using your same package versions. Could you please provide a small repo where the bug is reproducible? Meanwhile, I'm working on removing the src
folder from the published ones, as you stated this should be the issue.
Hey @stearm! Unfortunately I wasn't able to reproduce the error in isolation. I am only indirectly using graphql-hooks via another library, with no direct access to the source code. So I don't know exactly how they are using it. Thanks for taking care of the src folder that quickly, though!
Package
graphql-hooks
Environment
graphql-hooks
version: 6.0.5react
version: 18webpack
version: 5Description
My react 18 project is using a plugin which in turn makes use of the grapqhql-hooks library. Since the recent update to webpack 5 an error is thrown during the build process:
For some reason the src folder is shipped with the graphql-hooks library and webpack tries to load the typescript files contained in it. I don't see a reason why the src folder should be shipped with the package.
How to reproduce
I couldn't reproduce the error in a fresh react app. However, the src folder is contained in node_modules/graphql-hooks if you just create a new project and install the graphql-hooks library from npm:
npm i graphql-hooks@6.0.5
Suggested solution
It seems like there is a reference to one or more of the typescript files from the .dt.s files or something similar. I couldn't figure out though, which one. Furthermore the folder structure in the /lib/types folder seems weird. Besides the _d.ts files it includes another types folder (/lib/types/types) that only contains the common-types.d.ts file. Could you please have a look if there is an unintended reference?