Exciting news! @workboxjs 6.0 was just released! Check out the release notes (github.com/GoogleChrome/workbox/releases/tag/v6.0.0) and the brand new module Workbox Recipes (developers.google.com/web/tools/workbox/modules/workbox-recipes) designed to help get you using running quickly and easily!

  • 1
  • 6
  1. I think workbox-recipes will make high-quality SWs much easier to create and maintain! A full SW that does network-first pages, stale-while-revalidate CSS, JS, and Web Workers, cache-first images, and caches Google Fonts, all w/an offline fallback, can be written in 1 tweet:

    • 1
    • 3
    1. import * as recipes from ‘workbox-recipes’; import { precacheAndRoute } from ‘workbox-precaching’;

      precacheAndRoute(self.__WB_MANIFEST);

      recipes.pageCache(); recipes.googleFontsCache(); recipes.staticResourceCache(); recipes.imageCache(); recipes.offlineFallback();

      • 0
      • 3
      1. (for the offline fallback to work, you’ll need to set up precaching and include offline.html in the precache manifest, but that’s the only additional config needed)

        • 0
        • 0