delucis/astro-embed

Hi Youtube embed doesn't work

hanymorcos opened this issue · 6 comments

Hello,

I tried the demo. It doesn't work for me.
Unknown file extension ".astro" for /Users/hanymorcos/projects/astro/node_modules/@astro-community/astro-embed-youtube/YouTube.astro

I get this error initially.
Hint:
You likely need to add this package to vite.ssr.noExternal in your astro config file.
Stacktrace:

I added the needed changes.
The Youtube and Tweet don't render in md files. It doesn't work.

thanks,

Hany

Thanks for the report!

Seems to be due to a change in how packages like this are handled. Tracking the bug here: withastro/astro#4071

So does this plugin not work at all now? 😢

This issue should be fixed in the next Astro release!

Once withastro/astro#4623 is merged, astro-embed will be handled correctly.

Hi @delucis, the 'astro-embed/integration' method still doesn't work, however I was able to use a different method, via a remark plugin, to get things working as described here in case it's helpful to anyone else:

withastro/astro#4071 (comment)

Thanks again for the bug report @hanymorcos — this should be fixed in astro 1.1.6, which just went out.

@taoeffect That integration was designed for a previous version of Astro that supported components inside .md files. That support was dropped in Astro v1 unfortunately so we may need to look at an alternative route. Happy to see a new issue to discuss what we should do and if an integration still makes sense.