How to add support for PWA #408
-
|
I'm having issues with metro when I make a build of my application my service-worker isn't created, I'm using react native web and I don't know how to use a plugin from workbox with metro, currently I am using the example from expo about PWA. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
|
up! |
Beta Was this translation helpful? Give feedback.
-
|
up! |
Beta Was this translation helpful? Give feedback.
-
|
up |
Beta Was this translation helpful? Give feedback.
-
|
The guide linked is deprecated and should not be followed (as stated at the bottom). You should be following the documentation on the website. https://docs.expo.dev/guides/progressive-web-apps/ However, the Expo documentation is for setting up PWAs with Expo Web (using Webpack). Expo Router uses Metro, which doesn't have first-class support for PWA/Workbox. You can still use it, you will just need to do the setup manually as if you weren't using a framework or a bundler, just a vanilla HTML project. You can edit the root html file to include the scripts you need. |
Beta Was this translation helpful? Give feedback.
The guide linked is deprecated and should not be followed (as stated at the bottom). You should be following the documentation on the website. https://docs.expo.dev/guides/progressive-web-apps/
However, the Expo documentation is for setting up PWAs with Expo Web (using Webpack). Expo Router uses Metro, which doesn't have first-class support for PWA/Workbox.
You can still use it, you will just need to do the setup manually as if you weren't using a framework or a bundler, just a vanilla HTML project. You can edit the root html file to include the scripts you need.