Hey Everybody.
Ive builded a nice running template for your next projects, but in Svelte.
There was some help from the community(thank you @onsummer), but i decided to start from scretch…
Stack:
- Svelte
- Vite
- PWA (app install option on mobile and desktop)
- Serviceworker (cache first strategy)
Works without any server!
JamStack, static pages, prerendered, precompressed, hydrated via API, distributed via CDN.
GZip compresses the app from 4,3MB to only 1,02 MB!!!
The tiles get cached too and are available offline, just like in an app.
I almost got it working, that the globe also comes back after tabclose (without internet connection)
Maybe someone here knows how?
You able to just continue in javascript. You know javascript, right?
And if you ever hit an obstacle in the future(which is peoples over-reasoned main reason not using Svelte yet), just if, then just continue (or just implement one component) in your old, bloated, slow framework.
Thats Svelte!
Live: https://cloud-atlas.app
This is my Cloud Atlas project, but you able to download a clean template from the commits, till i am starting to go Cloud Atlas specific.
UPDATE: Here are some more serviceworker offline strategies for your individual needs
https://www.serviceworke.rs/ This collection is huge. Seems a bit deprecated (the website, not the code snippets) The code is in the upper right corner:
Every step in the code is very well explained, which makes you able to combine your own strategies.