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

Add service worker for expo web? #28

Open
Invertisment opened this issue May 3, 2021 · 1 comment
Open

Add service worker for expo web? #28

Invertisment opened this issue May 3, 2021 · 1 comment

Comments

@Invertisment
Copy link

Invertisment commented May 3, 2021

I'd like to know how to create a service worker for the web part of the project. I build the web part using expo and I needed to eject the native parts of the project.

I'm trying to add FCM messaging to the web. I already added it to native part.

I've found this topic: https://github.com/expo/fyi/blob/master/enabling-web-service-workers.md
But even though the title says "enable service workers" it only shows how to enable workbox-specific plugin that expo comes bundled with.

Also -- It would surely work if I'd simply be able to add JS files to some kind of static assets directory (let's say web/public/file.js). All I want to have is have a service worker JS file with replaced env variables.
Firebase library should ensure that the service worker gets activated. So I should be good if I'd simply have a JS file that has needed authentification details added to it.

I'd like to also know how to eject the web from expo workflow. I know it's nice to have it but I simply want to add a static file to the project and there is no way to do it. There is no tutorial for it.

@Invertisment Invertisment changed the title Ejected expo project web service worker customization Add service worker for expo web project? May 3, 2021
@Invertisment Invertisment changed the title Add service worker for expo web project? Add service worker for expo web? May 3, 2021
@iman2420
Copy link

Any solution?

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

2 participants