kaisermann / svelte-loadable

Dynamically load a svelte component
MIT License
320 stars 13 forks source link

Load over HTTP? #31

Closed tmclane closed 4 years ago

tmclane commented 4 years ago

Can a svelte component be loaded from an HTTP endpoint?

kaisermann commented 4 years ago

@tmclane Yes, but it depends on what a svelte component means. Is it pre-compiled or a raw .svelte file? For the first option you'd just need to pass a promise to the Loadable component which resolves to a compiled component. For the latter, you'd need to have the compiler in the browser context, as the REPL does.

I'm closing this one because it's is not exactly related to the library.