My project was build by vite, and it was registed vomposition-api ,such as this:
import Vue from 'vue';
import VCA from '@vue/composition-api';
Vue.use(VCA);
window.Vue = Vue;
...
Then,My component will register composition-api by CDN , because it is not sure if the project is ready rigisted composition-api.(I know this is a strange way)
now, my project(window.Vue ) has been registed compostion-api twice,beause there are two different composition-api.
after that, when each component is created, setup will executed twice.
how to avoid this condition if I only want register composition-api once?
My project was build by vite, and it was registed vomposition-api ,such as this:
Then,My component will register composition-api by
CDN
, because it is not sure if the project is ready rigisted composition-api.(I know this is a strange way)now, my project(
window.Vue
) has been registed compostion-api twice,beause there are two different composition-api.after that, when each component is created, setup will executed twice.
how to avoid this condition if I only want register composition-api once?