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…
- 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?
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.
GitHub: GitHub - worldpeaceenginelabs/CLOUD-ATLAS-SVELTE: This is the sourcecode of https://cloud-atlas.app, which is a so called Collective Computer. And its becoming like from the movies. A computer which duty it is to support us the best way to work to better ourselves and the rest of humanity.
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.