-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Publish a browser specific bundle for the client #47
Comments
The library leverages the Line 25 in 3f5c42e
If you look this lib up on unpkg following their URL structure: https://unpkg.com/[email protected] - you'll get the browser code exclusively. |
That’s not the issue. The file still has “exports” meaning it can’t be used via a script tag. It’s also using require in that. I was hoping for a single file with all that bundled. |
Ah, now I follow, you're interested in an AMD or UMD build. This makes sense! I'll see what I can do and will keep you posted 👍. |
I think rollup could help on this one |
🎉 This issue has been resolved in version 1.11.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Heads up! As of v1.11.0, you can: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>GraphQL over WebSocket</title>
<script
type="text/javascript"
src="https://unpkg.com/graphql-ws/umd/graphql-ws.min.js"
></script>
</head>
<body>
<script type="text/javascript">
(function () {
const client = graphqlWs.createClient({
url: 'wss://umdfor.the/win/graphql',
});
// consider other recipes for usage inspiration
})();
</script>
</body>
</html> * Plucked straight out of the lib recipes |
Not sure it needs the IIFE but yay. 🙌 |
Any chance on a browser specific bundle being added to the build process so that it's easy to use with services like unpkg?
The text was updated successfully, but these errors were encountered: