finds.dev← search

// the find

NekR/offline-plugin

★ 4,508 · JavaScript · MIT · updated Nov 2021

Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)

A webpack plugin from circa 2017-2021 that auto-generates a ServiceWorker (with AppCache fallback) based on your webpack output assets. Two lines of config and your webpack app gets offline caching — no hand-writing fetch event handlers or cache manifests. Aimed at teams adding offline-first to existing webpack projects without wanting to touch ServiceWorker APIs directly.

The zero-config default works: drop it in last in your plugins array, call the runtime install, done. The update strategy options (on-install, on-idle) give you real control over when users get new versions without writing the SW logic yourself. AppCache fallback for old browsers was genuinely useful when this was written and required non-trivial work to implement correctly. Browser test suite with actual Selenium runs against real browser behavior, not just unit-testing the generated output.

Dead project — last commit 2021, and it hasn't been updated for webpack 5's changed compilation hooks, so it silently breaks or produces incorrect manifests on anything current. AppCache is removed from all modern browsers, so half the value proposition is gone. No support for workbox-style routing strategies (network-first for API calls, cache-first for assets) — it's a blunt instrument that caches everything or nothing. The 4.5k stars reflect its 2017-2019 popularity; the 289 forks and open issues tell you the current state.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →