nitrovatter
nitrovatter

Reputation: 1201

Is it possible to use Vue 2 libraries in Vue 3 and vice versa?

I know, that Vue 3 has breaking changes.

But if the library doesn't use the backward incompatible features, can I use it in Vue 2 and Vue 3 simultaneously? Or I should await the release build specially build for Vue 3?

Upvotes: 3

Views: 5159

Answers (1)

silent-tiger
silent-tiger

Reputation: 528

It is likely not a good idea (in production). A number of parts of the api have been changed for example the syntax for directives has been changed, destroyed is now unmounted, scopedSlots have been merged in slots, using an empty vue object as an eventBus has been removed and many other small changes. These can probably all be fixed quickly but until the library maintainers do so you will have issues and warnings from vue2 packages.

Upvotes: 4

Related Questions