From: Stanislav Lashmanov Date: Fri, 21 Jan 2022 06:15:35 +0000 (+0300) Subject: fix(compat): simulate Vue 2.6.14 version in compat build (#5293) X-Git-Tag: v3.2.28~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0b9708620187e5ff31ef6c72a349384c32718ea;p=thirdparty%2Fvuejs%2Fcore.git fix(compat): simulate Vue 2.6.14 version in compat build (#5293) Some Vue plugins that are actually compatible with the `vue-compat` won't work because of the version check. Right now `vue-compat` returns 3x version for the legacy method of checking Vue version via `Vue.version`. This PR instends to simulate Vue 2 version in those instances and instead return a 2x-compatible version: `2.6.14-compat:3.x.x`. --- diff --git a/packages/runtime-core/src/compat/global.ts b/packages/runtime-core/src/compat/global.ts index 2e4898a708..e0fc699fa5 100644 --- a/packages/runtime-core/src/compat/global.ts +++ b/packages/runtime-core/src/compat/global.ts @@ -170,7 +170,7 @@ export function createCompatVue( } } - Vue.version = __VERSION__ + Vue.version = `2.6.14-compat:${__VERSION__}` Vue.config = singletonApp.config Vue.use = (p, ...options) => {