You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
Try to register service worker file ( service-worker.js ) from root path. But there is no such a file in build.
Expected behavior:
Need to register service worker for PWA
Steps to reproduce:
ionic start pwa blank --type=react
change serviceWorker.unregister(); to serviceWorker.register(); in index.tsx
ionic build --prod
npx serve build
Service worker can't be registered in local. But it runs service worker validation.
console: GET http://localhost:5000/service-worker.js 404 (Not Found)
The text was updated successfully, but these errors were encountered:
Thanks for the issue. There were some changes in how react-scripts v4 generated PWA-related files that caused this to no longer work. We have updated our starters to properly generate the service worker file now.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 5.x
Current behavior:
Try to register service worker file ( service-worker.js ) from root path. But there is no such a file in build.
Expected behavior:
Need to register service worker for PWA
Steps to reproduce:
ionic start pwa blank --type=react
change serviceWorker.unregister(); to serviceWorker.register(); in index.tsx
ionic build --prod
npx serve build
Service worker can't be registered in local. But it runs service worker validation.
console: GET http://localhost:5000/service-worker.js 404 (Not Found)
The text was updated successfully, but these errors were encountered: