netlify / create-react-app-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Service worker prevents function calls

lgraubner opened this issue · comments

As the service worker seems to be the "official" one I assume it can't be used like this in combination with functions.

facebook/create-react-app#2237 (comment)

The Service worker will just return the app instead of the function itself. Only option is ejecting and extend navigateFallbackWhitelist option.

I didn't test this with this package, but with a bare CRA app and functions which should be basically the same.

Hi Lars, sorry for the super super late response. i just joined the team.

Its been a long while so I'm gonna assume this is stale. but if you still need this looked at please feel free to reopen!

Hi Shawn, thanks for your response.

I think this is still relevant as this boilerplate will not work like this. Please correct me if I'm wrong. :)

Only solution for me was to eject and adjust the webpack config.

i mean for what its worth the service worker is off by default in CRA v2. i never use it.

This wasn't the case for v1. :) I'd suggest adding a note to the README to prevent other people from running into the same problem. I'm willing to create a PR if you like.