delucis / astro-embed

Low-JavaScript embed components for Astro websites
https://astro-embed.netlify.app
MIT License
194 stars 30 forks source link

Vimeo web component is not being defined #126

Closed aczw closed 1 month ago

aczw commented 3 months ago

Hi there, really odd issue: I'm using the <Vimeo /> component, and while it is rendered in the DOM tree, I think the lite-vimeo web component is never defined.

image

When I run customElements.get("lite-vimeo") in the console, I get back undefined. This means that it's never rendered. However, I checked the Network tab and the thumbnail and everything is being downloaded. Any ideas?

delucis commented 3 months ago

Hi @aczw! Could you share a reproduction? The <Vimeo> component definitely registers the custom element:

https://github.com/delucis/astro-embed/blob/9d0c83cb875a263d218520af6633f5391e82de18/packages/astro-embed-vimeo/Vimeo.astro#L160-L163

And you can see it working in the docs too. So it might be something specific to your usage/project?

delucis commented 1 month ago

Hi again @aczw — given we don’t have a reproduction, I’m closing this issue. Feel free to reopen or make a new issue if you can share a reproduction.

aczw commented 1 month ago

Ah sorry about that, life has gotten in the way. I'll def let you know if I can reproduce it again in the future.