ryoppippi/sveltweet

preprocessor

Opened this issue · 0 comments

We need to fetch tweet in server-side because of CORS issue.
However:

  • current svelte (even svelte5) doesn't support await block
  • we cannot define server only fetch in +page.ts, which is bad for using markdown preprocessor. +page.server.ts cannot return svelte component
  • Svelte5 has server-render function, but it doesn't support async/await either
  • Astro is the easiest choice to solve this(we can use top-level await and we can restrict it to run in inside server or build-time), BUT WE LOVE SVELTE COMMUNITY

So, we need to create preprocessor to fetch tweet in compile time.......