Official Manic plugin for Progressive Web App manifests, install metadata, and service worker caching.
Manic is a high-performance React framework built exclusively for Bun.
It ships with a custom build pipeline, first-class plugin architecture, and production-ready DX for local development, deployment, and AI-native workflows.
- Bun-first runtime and tooling
- Fast transforms and minification powered by OXC
- File-based routing with production-ready deployment adapters
- Plugin system built for framework and AI-native workflows
- Website: manicjs.tech
- Docs: manicjs.tech/docs
- Package docs: https://www.manicjs.tech/docs/framework/plugins/pwa
bun add @manicjs/pwaimport { defineConfig } from "manicjs/config";
import { pwa } from "@manicjs/pwa";
export default defineConfig({
plugins: [
pwa({
name: "My Manic App",
shortName: "Manic App",
description: "An installable Manic application.",
themeColor: "#0a0a0a",
backgroundColor: "#0a0a0a",
icons: [
{
src: "/assets/pwa/icon-192.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "/assets/pwa/icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
}),
],
});The plugin generates /manifest.json, /sw.js, PWA meta tags, and a
browser-side service worker registration script.
Common options:
name: full install name for the app.shortName: compact install name.description: manifest description.themeColorandbackgroundColor: install UI and splash colors.icons: manifest icons. Include192x192and512x512PNGs for broad install support.screenshots: optional install screenshots for richer app store surfaces.shortcuts: launcher shortcuts.precache: additional same-origin app shell URLs to cache on install.offline: enable navigation fallback support. Defaults totrue.navigationFallback: HTML fallback for offline navigation. Defaults to/index.html.offlineFallback: optional custom offline page.cacheMaxAgeSeconds: default runtime cache age.cacheablePathPrefixes: static asset prefixes cached after first request.runtimeCaches: per-prefix strategies withcache-first,network-first, orstale-while-revalidate.manifestPath: custom manifest URL. Defaults to/manifest.json.serviceWorkerPath: custom service worker URL. Defaults to/sw.js.serviceWorker: custom service worker source for advanced PWA features such as push, background sync, app-specific offline logic, or custom cache routing.serviceWorkerScope: custom registration scope. Defaults to/.update: controlsskipWaiting,clientsClaim, refresh-on-update, and update checks on load.registerOnLocalhost: opt in to service worker registration on localhost. Defaults tofalseto avoid stale development caches.
GPL-3.0