“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:
- A manifest file (gatsby-plugin-manifest)
- A service worker (gatsby-plugin-offline)
- 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!