-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Adding package.json browser attribute pointing towards browser bundle… #1318
Conversation
… and reusing current webpack setup and destination.
Why is this necessary? Does this fix some issue you were encountering? |
Why do you need this? You are pointing it towards our analyze bundle which is used for internal development bundle size analysis only. It is not a production bundle in the slightest. Please submit an issue so we can help diagnose your issue 😊 |
Sure, I'll point to you apollographql/subscriptions-transport-ws#77 and before that apollographql/subscriptions-transport-ws#48 |
We provide the UMD bundle as Why is this not sufficient? |
Yeah looks like unpkg already works! |
Awesome, wasn't aware it can work without a browser entry, cool 👍 |
Hi guys, |
@schrepfler can you give it a shot? This isn't a supported way to use Apollo Client but if you figure out how to use it it will be helpful for others. |
I can see there are some things in the window object but not quite certain if that's the way to get it from (Java guy here.) Thinking of the wider apollo ecosystem, I think it would be nice if there's a unified way to expose browser-type modules between apollo-client and the subscription(-ws) modules. |
There are a couple of things I’d like to change about the build system, and this is one of them. How important is this for you @schrepfler? Any reason you can’t setup Webpack as this would be much easier at the moment and more powerful for you as a user. |
I certainly can but I think there are two kinds of people, those who use build systems and those which just want to experiment with the API's via a simple linked script. The thing which made me wish this is that I wanted to simply reference a module via cdn and unpkg allowed me to do so so I started to contribute to subscriptions-transport-ws but then I realised one woul also need the apollo client and maybe graphql and apollo subscriptions... |
We can't merge the PR in this form, but we'll work on improving our build process to make this much easier to do. Expect to see some movement on that soon. |
That's OK, if it sparks some movement that's great. My only desire is that whatever is delivered can be somehow used directly via unpkg. |
… and reusing current webpack setup and destination.
TODO:
No new logic