Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is service worker at src/service-worker.js? instead of TLD? #111

Open
eettaa opened this issue Mar 17, 2023 · 0 comments
Open

Why is service worker at src/service-worker.js? instead of TLD? #111

eettaa opened this issue Mar 17, 2023 · 0 comments

Comments

@eettaa
Copy link

eettaa commented Mar 17, 2023

https://github.com/expo/fyi/blob/main/enabling-web-service-workers.md and associated example https://github.com/expo/examples/tree/cfb044b07385773fac2247be968cc5c0b13be8bf/with-workbox both put the service-worker.js file in src/.... does this interfere with the service worker's scope and control as defined here? https://developer.chrome.com/docs/workbox/service-worker-lifecycle/#control-and-scope? I think the end goal is for the service worker to have dominion over the entire app.

More generally, what is this 'src/' directory? In any case, my app/ directory (which is the app root containing e.g. webpack-config) doesn't already contain a src/ directory yet (just top level code including App.tsx)... I'm wondering if the 'src/' directory is a magic directory from the perspective of webpack or something?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant