Skip to content

Commit

Permalink
Add note about service worker usage netlify#2
Browse files Browse the repository at this point in the history
  • Loading branch information
lgraubner committed Oct 20, 2018
1 parent ed3e6dd commit 48a9e1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 48a9e1f

Please sign in to comment.