File tree 3 files changed +15
-3
lines changed
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 68
68
"vue-server-renderer" : " ^2.6.11"
69
69
},
70
70
"peerDependencies" : {
71
- "vue" : " ^ 2.5.22 "
71
+ "vue" : " >= 2.5 < 3 "
72
72
},
73
73
"dependencies" : {
74
74
"tslib" : " ^2.0.0"
Original file line number Diff line number Diff line change @@ -46,12 +46,21 @@ export function install(
46
46
if ( __DEV__ ) {
47
47
assert (
48
48
false ,
49
- 'already installed. Vue.use(plugin ) should be called only once'
49
+ 'already installed. Vue.use(VueCompositionAPI ) should be called only once. '
50
50
)
51
51
}
52
52
return
53
53
}
54
54
55
+ if ( __DEV__ ) {
56
+ if ( ! Vue . version . startsWith ( '2.' ) ) {
57
+ assert (
58
+ false ,
59
+ `@vue/composition-api only works with Vue 2, v${ Vue . version } found.`
60
+ )
61
+ }
62
+ }
63
+
55
64
Vue . config . optionMergeStrategies . setup = function (
56
65
parent : Function ,
57
66
child : Function
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ let currentVM: ComponentInstance | null = null
7
7
8
8
export function getCurrentVue ( ) : VueConstructor {
9
9
if ( __DEV__ ) {
10
- assert ( currentVue , `must call Vue.use(plugin) before using any function.` )
10
+ assert (
11
+ currentVue ,
12
+ `must call Vue.use(VueCompositionAPI) before using any function.`
13
+ )
11
14
}
12
15
13
16
return currentVue !
You can’t perform that action at this time.
0 commit comments