Skip to content
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

Is @graphiql/toolkit ESM or not? #3506

Open
s100 opened this issue Jan 18, 2024 · 0 comments
Open

Is @graphiql/toolkit ESM or not? #3506

s100 opened this issue Jan 18, 2024 · 0 comments

Comments

@s100
Copy link

s100 commented Jan 18, 2024

After running npm install @graphiql/toolkit I see a directory esm and inside that I see numerous *.js files with the compiled code of the package. These source files use ES Modules syntax (import and export). Good stuff. But midway through esm/create-fetcher/lib.js is this line:

const { createClient } = require('graphql-ws') as {
createClient: typeof createClientType;
};

So is this an ES module or not? Please could you explain what's going on here. This causes a ReferenceError, surely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant