lukeed / svelte-ssr-worker

A quick demo for rendering Svelte server-side (SSR), but within a Cloudflare Worker!
https://cloudflareworkers.com/#9e1f81f41405f8851b39f4643ce12754:https://tutorial.cloudflareworkers.com/
154 stars 9 forks source link

Workers Sites #1

Closed wtcross closed 2 years ago

wtcross commented 4 years ago

The Wrangler CLI for Workers supports Webpack. I created an example project to show how to set up a SSR Svelte SPA using Cloudflare Workers Sites with Webpack: https://github.com/wtcross/svelte-ssr-cloudflare-worker-site

It leverages the svelte-loader for Webpack to do what your scripts do here. The only downside is usage of Webpack. Rather than waiting for Wrangler to add support for Rollup I think it would make a lot of sense to build a Svelte-specific CLI that leverages Rollup. You mention that you've been working on something in this project's README. Any ETA on that or would you be open to collaborating? I think this could be a really cool thing for the community.

I created an issue to suggest Wrangler add support for Rollup: https://github.com/cloudflare/wrangler/issues/1287