Skip to content

Commit d0b9708

Browse files
authored
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`.
1 parent c35ec47 commit d0b9708

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/compat/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function createCompatVue(
170170
}
171171
}
172172

173-
Vue.version = __VERSION__
173+
Vue.version = `2.6.14-compat:${__VERSION__}`
174174
Vue.config = singletonApp.config
175175

176176
Vue.use = (p, ...options) => {

0 commit comments

Comments
 (0)