Setup guide · SolidJS
Turn a SolidJS app into an installable PWA (2026)
SolidStart PWA recipe — manifest, service worker via vite-plugin-pwa and install prompt.
Key takeaways
- `vite-plugin-pwa` auto-generates manifest and Workbox SW.
- SolidStart supports the same plugin — no adapter changes needed.
- Add InstantPWA for cross-platform install UI.
Before you start
- Vite 5+
- HTTPS origin
- 512px icon
manifest.webmanifest
{
"name": "Your product",
"short_name": "Product",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#111827",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
]
}Step-by-step for SolidJS
- Step 1Install the plugin
Run `npm i -D vite-plugin-pwa`.
- Step 2Enable it in vite.config.ts
import { VitePWA } from 'vite-plugin-pwa'; export default { plugins: [VitePWA({ registerType: 'autoUpdate', manifest: { name: 'Your app', short_name: 'App', display: 'standalone', icons: [{ src: '/icon-512.png', sizes: '512x512', type: 'image/png' }] } })] }; - Step 3Drop in the install popup
Paste the InstantPWA snippet into `index.html`.
Minimal sw.js
// public/sw.js
self.addEventListener('install', (e) => self.skipWaiting());
self.addEventListener('activate', (e) => self.clients.claim());
self.addEventListener('fetch', () => {});Common SolidJS gotchas
- Hot reload does not run the SW — test installability with `vite preview`.
- Use `registerType: autoUpdate` so users get new versions without refreshing.
FAQ
Do I need a native app if my SolidJS site is a PWA?
No. Once your SolidJS site meets the three PWA criteria (HTTPS, a manifest, a service worker), Chromium browsers offer to install it and iOS Safari 16.4+ supports the full standalone experience — including web push.
Will a service worker slow my SolidJS site down?
Not measurably on first load. The worker installs asynchronously after the page becomes interactive. On repeat visits it typically improves LCP and TTFB because assets are served from cache.
Can I still deploy my SolidJS site to Vercel, Netlify or Cloudflare?
Yes. Any static or edge host works — the manifest and service worker are plain files served from the origin. No build-time integration is required.
Skip the setup — drop in one line
InstantPWA handles the install prompt across iOS, Android and desktop. Free forever for one popup.
Get started free