-
Notifications
You must be signed in to change notification settings - Fork 109
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
Provide modules to host app or control host app imports #170
Comments
(Having multiple instances of ember-auto-import is supposed to be irrelevant. They will find each other and deduplicate, as long as everybody is resolving the same copy of the dependency. I don't think that is actually your problem here.)
This is annoying because it means app authors need to be told to install two packages ( |
Thanks a lot for the pointer. That makes a lot of sense. I'll give it a go later. 👍 |
I have tried to add peerDependencies to the PR mentioned above and it doesn't seem to solve the problem we are seeing. The thing is, we are seeing this error within I have a branch in my fork where it is rebased and has the peer deps specified: https://github.com/josemarluedke/ember-apollo-client/tree/jl-ts-with-peer-deps. Check this commit to see relevant changes. Any other ideas for us to try? |
There are multiple layers of issues combining here. That branch you shared allowed me to reproduce a legit bug in ember-auto-import. We are including graphql in both vendor.js and test-support.js. I filed #175 to cover that. That is probably enough to fix your dummy app, because by definition your dummy app and your addon have the same dependencies. But it's probably not enough to get what you want in real apps, because you still have
|
Since the original request in this issue is anti-pattern-ish and the underlying bug that motivated it is tracked in #175, I think we can close this issue. @ef4 Thanks for the suggested peerDep fix! |
I think we already had an issue about this, but I can't seem to find it.
I am in the process of migrating
ember-apollo-client
to TypeScript and upgrading it to the latest and greatest of all its dependencies and seem to have hit a brick wall. 🚧ember-graphql/ember-apollo-client#175 (comment):
We cannot force the consumer to import
graphl
from an addon re-export likeember-apollo-client/graphl
, because there might be third-party libraries likegraphql-tools
, that importgraphql
in turn.Do you know a clever way for an addon to "inject" arbitrary imports into the host app or control where the host app is getting its imports from?
The text was updated successfully, but these errors were encountered: