Closed reno1979 closed 2 years ago
The reason it's not getting the attributes/members for the mixin is because the mixin is not exported. (a customElements.define
'counts' as an export in this case as well, because it makes your element globally available). If something is not exported from a module, it's essentially private, and shouldn't be added to the manifest.
For inheritance that should work a bit different though, because class A
can still use a FooMixin
, and the inherited members/attrs/etc should still be documented on class A
.
I think it's just a matter of switching the order of the applyInheritancePlugin
and the removeUnexportedDeclarationsPlugin
(only remove unexported declarations after applying inheritance). I'll take a look at this today.
@thepassle That actually makes sense, thanks for looking into this. FYI the generated custom-elements.json will be used for Storybook (support v1.0 manifest >= v6.4.0)
Published in v0.5.7, thanks for reporting
Checklist
--dev
flag to get more information?Completing the items above will greatly improve triaging time of your issue.
Expected behavior When I use a mixin for retrieving a Custom Element class, and extend using a mixin. I expect the attributes from the mixin I'm extending on te become available.
Some code to demonstrate:
The result has no attributes at all:
When I uncomment the last two lines of the example code, the result changes to this (and has the expected attributes)
The above result is only retrieved when all 4 lines are uncommented: