Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid duplicate register composition-api ? #974

Closed
vanclimber opened this issue Jan 5, 2023 · 1 comment
Closed

How to avoid duplicate register composition-api ? #974

vanclimber opened this issue Jan 5, 2023 · 1 comment

Comments

@vanclimber
Copy link

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?

@vanclimber vanclimber changed the title How to avoid duplicate register vomposition-api ? How to avoid duplicate register composition-api ? Jan 5, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant