DEV Community 👩‍💻👨‍💻

Discussion on: Building a blog with Svelte: Dynamic imports For Svelte components

joas8211 profile image
Jesse Sivonen

Bad SEO (unable to crawl) is one downside of using dynamically loaded components. I've resolved it be modifying Svelte to allow using await on "top-level" of component script so that component loading blocks rendering, even on SSR. I should rebase the fork and finally try to get it to main Svelte repository if there's others that need it.

chrsjxn profile image
Chris Jackson Author

Yeah, that's a good caveat. And I need to dig more into the specifics of how crawlers are handling JS now.

But rollup fingerprints the chunks, which is good for CDN support of these static assets. So I would expect SEO to work at least as well as a traditional api-backed SPA, but possibly not as well as static pages