You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above repo is a reproduction of the problem I'm experiencing on a larger markdown website. Content is loaded dynamically using Vite's import() function in /routes/+page.server.js.
The package works great with normal .svelte and .md content but breaks when I import at compile time. This makes sense to me but is there any way around this?
The text was updated successfully, but these errors were encountered:
acidtone
changed the title
Dynamic markdown render breaks embed functionality
Embed functionality breaks when using Vite import()Sep 5, 2023
acidtone
changed the title
Embed functionality breaks when using Vite import()
Embed functionality breaks when using Vite import()
Sep 5, 2023
Is there nothing in the terminal to hint at an issue when building or running in dev?
No errors in either the browser or in the terminal. And there's no indication that the page is trying to fetch the YouTube link in the Network tab.
I don't know enough about the lifecycle of Vite/SK/Mdsvex to really know what's going on. I guess the backend compilation isn't triggering the embed by the time it renders in the DOM?
Describe the bug
sveltekit-embed
doesn't embed content when it's rendered as a dynamic markdown import.To Reproduce
Steps to reproduce the behavior:
Expected behavior
YouTube content should load normally.
Additional context
GitHub Repo: https://github.com/acidtone/sveltekit-embed-test/
The above repo is a reproduction of the problem I'm experiencing on a larger markdown website. Content is loaded dynamically using Vite's
import()
function in/routes/+page.server.js
.The package works great with normal
.svelte
and.md
content but breaks when I import at compile time. This makes sense to me but is there any way around this?The text was updated successfully, but these errors were encountered: