From 8ccd222281525c7bf6d6a0e13d07e0144454a18e Mon Sep 17 00:00:00 2001 From: Daniel Cooke Date: Thu, 6 Dec 2018 20:24:43 +0000 Subject: [PATCH] Service workers note (#10276) * Service workers note - Adding a note that informs readers that the service workers will only register on a production build. - I was confused and I had to dig into the source code to find out why they weren't working on develop * Update docs/docs/add-offline-support-with-a-service-worker.md Agreed Co-Authored-By: danielcooke1996 --- docs/docs/add-offline-support-with-a-service-worker.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/add-offline-support-with-a-service-worker.md b/docs/docs/add-offline-support-with-a-service-worker.md index eb7438ff92231..d441fb10314f0 100644 --- a/docs/docs/add-offline-support-with-a-service-worker.md +++ b/docs/docs/add-offline-support-with-a-service-worker.md @@ -41,6 +41,8 @@ Add this plugin to your `gatsby-config.js` That's all you need to add offline support to your Gatsby site. +Note: Service worker registers only in production builds (`gatsby build`). + ## References - [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/)