Skip to content

Commit

Permalink
fix(compat): simulate Vue 2.6.14 version in compat build (#5293)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
CyberAP authored Jan 21, 2022
1 parent c35ec47 commit d0b9708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/compat/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit d0b9708

Please sign in to comment.