Skip to content

Instantly share code, notes, and snippets.

@gillkyle
Created April 10, 2020 16:03
Show Gist options
  • Save gillkyle/9e4fa3d019c525aef2f4bd431c806879 to your computer and use it in GitHub Desktop.
Save gillkyle/9e4fa3d019c525aef2f4bd431c806879 to your computer and use it in GitHub Desktop.

Make your Gatsby site a “Progressive web app" (PWA)

“Progressive web app” (PWA) is a term for a new philosophy of building websites.

They help provide native-like features to web apps across platforms and require 3 things:

  1. A manifest file (gatsby-plugin-manifest)
  2. A service worker (gatsby-plugin-offline)
  3. Run on https

Install the necessary NPM packages:


Add the manifest plugin and the offline plugin to your Gatsby config, which will add a manifest file and a service worker for you.


Then refer to the docs to add required configuration options to the manifest plugin: https://www.gatsbyjs.org/packages/gatsby-plugin-manifest/?=manifest#add-plugin-and-manifest-settings---required


The final step is running your site with https, which can vary by deployment, though you can test it locally.

And your recipe is served!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment