From 48a9e1fa0551efcb7c2c350690ec548ae243f041 Mon Sep 17 00:00:00 2001 From: Lars Graubner Date: Sat, 20 Oct 2018 10:54:26 +0200 Subject: [PATCH] Add note about service worker usage #2 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index dce2369..ce841ce 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,7 @@ yarn start This will start the normal create-react-app dev server and open your app at `http://localhost:3000`. Local in-app requests to the relative path `/.netlify/functions/*` will automatically be proxied to the local functions dev server. + +## Service Worker + +The service worker does not work with lambda functions out of the box. It prevents calling the function and returns the app itself instead ([Read more](https://github.com/facebook/create-react-app/issues/2237#issuecomment-302693219)). To solve this you have to eject and enhance the service worker configuration in the webpack config. Whitelist the path of your lambda function and you are good to go.