vuejs / composition-api

Composition API plugin for Vue 2

Home Page:https://composition-api.vuejs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to avoid duplicate register composition-api ?

vanclimber opened this issue · comments

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?

Stale issue message