ember-graphql / ember-apollo-client

🚀 An ember-cli addon for Apollo Client and GraphQL
MIT License
279 stars 72 forks source link

Remove webpack configuration for externalising react #393

Closed bzf closed 3 years ago

bzf commented 3 years ago

Since already we use the @apollo/client/core import, react won't be included in the build.

Closes https://github.com/ember-graphql/ember-apollo-client/issues/389

bzf commented 3 years ago

This fixes the issue we are experiencing at work, but I know very little about webpack and used @achambers suggestion in #389 to help move this forward. Hope that's ok 😊

josemarluedke commented 3 years ago

Thank you @bzf. Published in v3.1.1.

knownasilya commented 3 years ago

I think this is still needed, because if a user imports anything from apollo, like error classes, they run into the error without this config. Maybe the solution is to codemod in the blueprint? And anyone using react can remove it.

josemarluedke commented 3 years ago

@knownasilya there are two alternatives to avoid this issue:

knownasilya commented 3 years ago

Seems like you'd have to do both honestly, since there is no great way to enforce where you import from.