Missed the action at the 2018 Chrome Dev Summit? Catch up with our playlist on the Google Chrome Developers channel on YouTube. Watch now.

Generate a Complete Service Worker

Workbox can generate a complete service worker that supports precaching and set up runtime caching purely from a configuration object or file. This is a great option for anyone looking for an easy solution and works really well for static sites.

You can generate a service worker using the CLI, workbox-build Node module or with the webpack plugin.

Depending on how you build your site, you’ll need to select the right tool for you. The CLI is easiest to get up and running with. The Node Module workbox-build is useful if you have a build process that runs in node, like Gulp. If you use webpack, the Workbox plugin will be the best fit.

Workbox Command Line Interface (CLI)

Ideal for developers who are unfamiliar with Node or have simple needs.

Learn how to use the CLI

workbox Build

Perfect for developers wanting to programmatically generate the service worker in Node or are using Gulp for their build process.

Learn how to use workbox-build

Workbox Webpack Plugin

Ideal for developers using webpack to build their project.

Learn how to use the Webpack Plugin