All Projects → mischnic → Parcel Plugin Sw Cache

mischnic / Parcel Plugin Sw Cache

Licence: mit
📦👷 Parcel plugin for caching using a service worker

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Parcel Plugin Sw Cache

jekyll-pwa-workbox
A Jekyll plugin using Workbox to make your PWA / Website available offline.
Stars: ✭ 22 (-51.11%)
Mutual labels:  service-worker, progressive-web-app, offline-first, workbox
Ember Service Worker
A pluggable approach to Service Workers for Ember.js
Stars: ✭ 227 (+404.44%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Sw Toolbox
A collection of tools for service workers
Stars: ✭ 3,649 (+8008.89%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Offline Plugin
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
Stars: ✭ 4,444 (+9775.56%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Notepad
📒 An offline capable Notepad PWA powered by ServiceWorker
Stars: ✭ 100 (+122.22%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Workbox
📦 Workbox: JavaScript libraries for Progressive Web Apps
Stars: ✭ 10,434 (+23086.67%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Android Pwa Wrapper
Android Wrapper to create native Android Apps from offline-capable Progressive Web Apps
Stars: ✭ 265 (+488.89%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Jfa Pwa Toolkit
⚡️ PWA Features to Any Website (very Fast & Easy)
Stars: ✭ 245 (+444.44%)
Mutual labels:  offline-first, progressive-web-app, service-worker
chicio.github.io
👻 Fabrizio Duroni (me 😄) personal website. Created using GatsbyJS, Styled Components, Storybook, Typescript, tsParticles, GitHub pages, Github Actions, Upptime.
Stars: ✭ 20 (-55.56%)
Mutual labels:  service-worker, progressive-web-app, workbox
next-with-workbox
Higher order Next.js config to generate service workers
Stars: ✭ 22 (-51.11%)
Mutual labels:  service-worker, progressive-web-app, workbox
react-app-rewire-workbox
Customise the service worker for create-react-app apps without ejecting - using Google's Workbox webpack plugins instead of the old sw-precache
Stars: ✭ 44 (-2.22%)
Mutual labels:  service-worker, progressive-web-app, workbox
Beer
The source code for the Progressive Beer app!
Stars: ✭ 73 (+62.22%)
Mutual labels:  offline-first, progressive-web-app, service-worker
So Pwa
A progressive web app to read Stack Overflow content.
Stars: ✭ 235 (+422.22%)
Mutual labels:  progressive-web-app, service-worker, workbox
Monitaure
🔔 A server uptime monitoring progressive web application - NO LONGER MAINTAINED
Stars: ✭ 135 (+200%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Pwatter
Angular Progressive Web App using Workbox
Stars: ✭ 167 (+271.11%)
Mutual labels:  progressive-web-app, service-worker, workbox
affilicats
🐈 Progressive Web App demo that showcases flaky network resilience measures (📶 or 🚫📶).
Stars: ✭ 65 (+44.44%)
Mutual labels:  service-worker, progressive-web-app, offline-first
Upup
✈️ Easily create sites that work offline as well as online
Stars: ✭ 4,777 (+10515.56%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Sw Precache
Service Worker Precache is a module for generating a service worker that precaches resources. It integrates with your build process. Once configured, it detects all your static resources (HTML, JavaScript, CSS, images, etc.) and generates a hash of each file's contents. Information about each file's URL and versioned hash are stored in the generated service worker file, along with logic to serve those files cache-first, and automatically keep those files up to date when changes are detected in subsequent builds.
Stars: ✭ 5,276 (+11624.44%)
Mutual labels:  offline-first, progressive-web-app, service-worker
Super Progressive Web Apps
SuperPWA helps to convert your WordPress website into Progressive Web Apps instantly. PWA (Progressive Web Apps) demo at : https://superpwa.com and Plugin :
Stars: ✭ 304 (+575.56%)
Mutual labels:  progressive-web-app, service-worker
Progressive Web Apps Book
All of the code for "Progressive Apps" - a book by Dean Hume
Stars: ✭ 270 (+500%)
Mutual labels:  progressive-web-app, service-worker

Parcel plugin for sw-caching

A Parcel plugin to run workbox-build after every build.

yarn add -D parcel-plugin-sw-cache
# or
npm install -D parcel-plugin-sw-cache

The plugin is configured using the cache object inside package.json of your project. (Example). Configuration keys used by the plugin (default options first):

{
    "dependencies": {
        // ...
    },
    //...
    "cache": {
        "disablePlugin": false || true,
        "inDev": false || true,
        "strategy": "default" || "inject"
        "clearDist": true || false
    }
    //...
}

The remaining properties in this object will be passed to generateSW or injectManifest (depending on strategy). See https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build

In inject mode, occurences of __PUBLIC will be replaced with Parcel's public-url option. In this case, swSrc is also a required parameter.

No configuration options are mandatory, the default configuration will work just fine. (Creating a service worker to precache all files in the output directory without runtime caching). With strategy: "default", the default parameters passed to workbox-build are (which precaching all html, js, css, jpg and png files):

{
    globDirectory: outDir,
    globPatterns: ["**/*.{html,js,css,jpg,png}"],
    swDest: swDest,
    navigateFallback: publicURL + "/index.html",
    clientsClaim: true,
    skipWaiting: true,
    templatedURLs: {
        "/": ["index.html"]
    }
}

and with inject:

{
    globDirectory: outDir,
    globPatterns: [
        "**/*.{html,js,css,jpg,png,gif,svg,eot,ttf,woff,woff2}"
    ],
    swDest: swDest,
    templatedURLs: {
        "/": ["index.html"]
    }
}

To specify a RegExp, use an array instead (ignoreURLParametersMatching, navigateFallbackWhitelist, runtimeCaching.urlPattern, injectionPointRegexp).

runtimeCaching: [
    {
        urlPattern: /my-match\/api\.[0-9]+/i
    }
]

becomes

"runtimeCaching": [
    {
        "urlPattern": ["my-match\/api\\.[0-9]+", "i"]
    }
]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].