How to create a Svelte app with serverless

Link to chapter — https://serverless-stack.com/examples/how-to-create-a-svelte-app-with-serverless.html

Great tutorial - very exciting,
a couple things I noticed…

  1. ViteStaticSite has been replaced with StaticSite, I had to go find the
    upgrade-guide#upgrade-to-v118 for an explanation

  2. the stack output thorows an error unless you pass in a string like this, it wasn’t obvious right away to me at least so might be work mentioning.
    site: site.url || 'http://localhost:5173'

  3. npm start doesn’t exist anymore, should use npm run dev

Also might just be me but the sst console just didn’t work, I tried firefox, brave and chrome (all running reasonable new versions) .

We’ll have those changes fixed.

For the console, there are some additional steps for some browsers. But it should work in Chrome. SST Console | SST

Awesome - I would have submitted a PR but didn’t see a way, maybe i missed it?
Are the docs in github?

There’s an “Edit this page” link at the top of the doc. That should help you submit a PR.

I pushed out some fixes for it: Fixing Svelte example · AnomalyInnovations/serverless-stack-com@3b9d77e · GitHub

1 Like