class Foo extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return { 'x-bar': Bar };
}
}
Load the polyfill
Have <x-foo> in the DOM
Call customElements.define('x-foo', Foo);
window.customElements.get('x-bar') === Bar
Step 3 should be false, but is true.
If I remove <x-foo> from the DOM, then step 3 is false.
Also this only seems to happen with a production (rollup) build, not with a dev build :/ (specifically storybook build using vite build vs storybook dev)
Atm I only have time to report this and not create a reproduction :/
<x-foo>
in the DOMcustomElements.define('x-foo', Foo);
window.customElements.get('x-bar') === Bar
Step 3 should be
false
, but istrue
.If I remove
<x-foo>
from the DOM, then step 3 is false.Also this only seems to happen with a production (rollup) build, not with a dev build :/ (specifically
storybook build
using vite build vsstorybook dev
)Atm I only have time to report this and not create a reproduction :/