File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 6868 "vue-server-renderer" : " ^2.6.11"
6969 },
7070 "peerDependencies" : {
71- "vue" : " ^ 2.5.22 "
71+ "vue" : " >= 2.5 < 3 "
7272 },
7373 "dependencies" : {
7474 "tslib" : " ^2.0.0"
Original file line number Diff line number Diff line change @@ -46,12 +46,21 @@ export function install(
4646 if ( __DEV__ ) {
4747 assert (
4848 false ,
49- 'already installed. Vue.use(plugin ) should be called only once'
49+ 'already installed. Vue.use(VueCompositionAPI ) should be called only once. '
5050 )
5151 }
5252 return
5353 }
5454
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+
5564 Vue . config . optionMergeStrategies . setup = function (
5665 parent : Function ,
5766 child : Function
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ let currentVM: ComponentInstance | null = null
77
88export function getCurrentVue ( ) : VueConstructor {
99 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+ )
1114 }
1215
1316 return currentVue !
You can’t perform that action at this time.
0 commit comments