You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm curious to learn what you've seen as patterns in this scenario.
@types/axios would be a sad thing to carry as a dependency as it should contain only type information and no impact on runtime code. But there's no such declaration as peerDevDependency -- which is kind of what is necessary if I understand it right.
I've tried using import type to be more explicit in some places, but I'm not sure this would help (not using yarn, so no equivalent experience)
Axios includes types, so having it as a peer dep is required in a monorepo where there's a risk of multiple axios versions, some hoisted, some not (by yarn). When a package relies on axios and axios-retry, axios-retry may be hoisted, and the type it'll try to load would be from a hoisted axios, which might cause a conflict.
Trying to use this package with yarn v2 & tsc and it's breaking because of this. Any objections to adding it in? Happy to submit a PR if needed.
The text was updated successfully, but these errors were encountered: