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

Cannot use vue2.7 lifecycle hook through module federation #2698

Open
5 tasks done
Cybbin opened this issue Jul 4, 2024 · 1 comment
Open
5 tasks done

Cannot use vue2.7 lifecycle hook through module federation #2698

Cybbin opened this issue Jul 4, 2024 · 1 comment

Comments

@Cybbin
Copy link

Cybbin commented Jul 4, 2024

Describe the bug

I have two applications built on Vue 2.7. When I try to share app1's component through module federation with app2, I find that I can't use such as "onMounted" composition api hook.

vue.runtime.esm.js:4448 [Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().

image

Reproduction

https://github.com/Cybbin/pj-module-federation

Used Package Manager

npm

System Info

vue2.7

Validations

@ScriptedAlchemy
Copy link
Member

Vue is not shared

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

No branches or pull requests

2 participants