Simple native-like App in SvelteKit!
Channel: Antonio Sarcevic
Date: 2023-05-29

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-first-installable-pwa-sveltekit-workbox-precaching/app-icons.zip

✂️ Code for copying and pasting: https://github.com/SarcevicAntonio/offline-first-pwa-sveltekit-workbox-precaching#readme

📝 Blog Post: https://www.sarcevic.dev/offline-first-installable-pwa-sveltekit-workbox-precaching

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 💖