Parcel Plugin for Hashed Service Worker Assets
JSON →The `parcel-plugin-sw-asset-urls` (version 0.1.2) is a plugin specifically designed for `parcel-bundler` (Parcel v1.x) that addresses a common issue in Progressive Web App (PWA) development. Parcel automatically generates static assets with hashed filenames for effective browser cache busting. However, in Parcel v1, it does not inherently update the `sw.js` (service worker) file with these newly hashed URLs, leading to broken asset paths in the service worker's cache manifest. This plugin integrates into the Parcel v1 build process to replace the original, unhashed asset filenames within the generated service worker script with their corresponding hashed versions in the `dist` directory. This ensures the service worker correctly identifies and caches the fingerprinted assets. The package is currently at an early version (0.1.2) and its development is tied to Parcel v1, making it incompatible with Parcel v2, which has a different plugin architecture and often handles such issues internally or with updated strategies.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇳🇴 Norway · 🇨🇦 Canada · VN