-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Description
Vue version
3.5.0 - 3.5.13
Link to minimal reproduction
Steps to reproduce
Create two custom elements using Vue's defineCustomElement
(outer-component
and inner-component
). In both defineCustomElement
calls, use configureApp
to provide
a value. Then, nest inner-component
within outer-component
.
What is expected?
I expect that both custom elements get their own isolated injection scope. Values that are provided on inner-component
are not visible on outer-component
, and vice versa.
Or, even if inner-component
has access to the values provided by outer-component
, I expect that it definitely has access to the values provided on inner-component
and those have precedence.
What is actually happening?
The injection scope of outer-component
is applied to inner-component
.
This means that when using inject
in inner-component
, only values that are provided on outer-component
can be injected. Values provided on inner-component
are not injectable within inner-component
.
System Info
Any additional comments?
No response