Skip to content

Commit

Permalink
Merge pull request #9 from lgraubner/master
Browse files Browse the repository at this point in the history
Add note about service worker usage #2
  • Loading branch information
swyxio authored Oct 22, 2018
2 parents 0633850 + 48a9e1f commit f0e94f1
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 @@ -49,3 +49,7 @@ yarn start:app
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 f0e94f1

Please sign in to comment.