Is there a way to disable the service worker that’s automatically created with Expo web?
I’m running into some frustrating issues in production where the service worker is caching assets that have since been deleted.
I’ve tried setting expo.web.build.properties.serviceWorker
to false
in the app.json
, but that didn’t seem to have any effect. Because it’s not possible to put regular expressions into the JSON file, it seems like you’re not able to list regular expressions, so my effort to set expo.web.build.properties.serviceWorker.exclude
to /.*/
(based on Workbox’s GenerateSWOptions) was unsuccessful. Any tips?
Resources:
-
expo-cli schema (search for
serviceWorker
) -
withWorkbox.ts
, which seems to be the code that parses the configuration and passes it to the actual Workbox module