Possible To Somehow Move Third Party Package Dependencies into peerDependencies?

51 Views Asked by At

I'm working on a project where some of the third party packages have included Vue as one of their Dependencies, which causes duplicate instances of Vue and the dreaded duplicate 'You are running Vue in development mode' in the console.

It's a monolith app using Vue with blade templates, each containing their own Vue app. A global Vue instance is instantiated in the app.js file, bundled using Laravel Mix.

Removing the dependencies that I can see use Vue as an actual dependency and not a peerDep fixes this.

I was wondering if there's a way to explicitly state to these packages that Vue should be a peer, thus only using the version that's in my environment.

Some examples of these packages would be:

https://github.com/karoletrych/vue-cron-editor/blob/master/package.json https://github.com/Leecason/element-tiptap/blob/next/package.json

As you can see in their packages, they don't use Vue as a peerDep.

Any pointers really appreciated.

0

There are 0 best solutions below