DEV Community

loading...

Discussion on: Statically generated website with Svelte and Sapper

Collapse
khrome83 profile image
Zane Milakovic

Nice write up. I did this for Khrome.dev.

We started to adopt this professionally at my job as well. The biggest issues we have found is with Sapper not Svelte.

It’s worth mentioning that Sapper is not ready for production in general. We use it, because we are static generation of the site in the build pipeline, so the risk is not see by users.

We found out that the current Sapper version has memory issues when you go about a few hundred pages. It depends on the complexity, but it’s pretty easy to hit. So it’s good now for small sites, but marketing and enterprise sites should think twice.

We opened a few PR that solve these issues, and improves the deploy time greatly. But they have been sitting idle since September. Which makes me worried the project is vaporware.

Otherwise I have really grown to love it.

Collapse
vannsl profile image
Vannsl Author

That's very good to know. I've added the version of Sapper in the beginning of the article because I also had the same feeling that Sapper is not ready for complex applications yet. I read that the authors of the open-source software are telling us the same on their web page.

I think for the early state of the project a lot more things are working than I would have imaged. E.g. I can change the tailwind.config.js and it gets recompiled on the fly. But from time to time (more often than I'd like to) I have to restart the process.

I totally enjoy writing it, it feels even more "vanilla-javascriptishy" than Vue. Amazing that you've tried it out for more complex applications and giving us your insights.

Collapse
khrome83 profile image
Zane Milakovic

github.com/khrome83/khrome.dev

You can check out my source code for my blog. I am hosting on Zeit Now instead of Netlify, otherwise pretty similar.

The one thing I did was try and replace Gridsome, which uses GraphQL to access Markdown files.

I am not 100 hundred percent happy with the final output. I want to get the graphql into the page itself, instead of the JSON file, but it worked out well. It keeps the request only having the data I need.