Simple native-like App in SvelteKit!
Antonio Sarcevic
0:00 / 0:00
Simple native-like App in SvelteKit!
9 653 просмотра · 3 года назад
Antonio Sarcevic
622 подписчика
9 653 просмотра · 3 года назад
This guide shows how to create a simple installable and offline-first web application using SvelteKit and workbox-precaching. It only takes less than ten lines of code for the Service Worker!
With this, you might not need a native App, or hybrid using Electron, React Native, Flutter, Tauri, Cordova or Ionic! Just build one web app that works everywhere, available from your home screen or app launcher and even offline. SvelteKit and workbox-precaching pair nicely to take the work off your hands.
🖼️ App Icons: https://www.sarcevic.dev/offline-firs...
✂️ Code for copying and pasting: https://github.com/SarcevicAntonio/of...
📝 Blog Post: https://www.sarcevic.dev/offline-firs...
Timestamps:
00:00 Intro
00:36 Create SvelteKit App
01:08 App Icons
01:18 Web App Manifest
02:19 Service Worker
04:01 Define NODE_ENV
04:23 Notes on Offline Data
04:47 Prerender Pages
05:00 Check the App in prod
05:21 Useful Tips when working with Service Workers and Caching
05:59 Outro
Special thanks to my Schapsi 💖