fix(vite): add missing peer dependency on vue#1097
Conversation
✅ Deploy Preview for vue-devtools-docs canceled.
|
skirtles-code
left a comment
There was a problem hiding this comment.
I'm struggling to understand the motivation behind this change.
vite-plugin-vue-devtools doesn't import anything from vue directly, either in the original source or the built files.
Why do we need to list a dependency on vue if it's only used via a transitive dependency that's already listed?
Could you provide some more explanation about what you're hoping to achieve with this change?
Thanks.
|
Consider the case where a user is creating an app that depends on If the app is using npm, then it is not guaranteed that the instance of Ensuring that the app and If the app is using pnpm, peer dependencies can be satisfied by and only by ancestors. So Relying on implicit peer dependency isn't ideal. Adding a dependency may inadvertently remove an implicit peer dependency which can lead to breakage. For example, if If the app is using Yarn with node-modules, it suffers the same problem as npm. Yarn will warn about this but ultimately relies on hoisting to make If the app is using Yarn with PnP, In other words, for The examples I provided may be far-fetch and may not exactly apply to |
vite-plugin-vue-devtoolshas a dependency on@vue/devtools-corewhich peer-depends onvue, butvite-plugin-vue-devtoolsdeclares neither a dependency nor a peer-dependency onvueThis PR adds
vueas a peer-dependency ofvite-plugin-vue-devtools