ServiceWorker error when deploying production build to firebase
yannickvg opened this issue · 3 comments
Resources:
Before submitting an issue, please consult our docs.
Stencil version: (run npm list @stencil/core
from a terminal/cmd prompt and paste output below):
"@stencil/core": "^0.9.11"
I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
I'm using stencil in combination with "@ionic/core": "4.0.0-alpha.7". When deploying a production build to firebase, some service worker errors are visible.
Expected behavior:
The service worker should be registered in the browser.
Steps to reproduce:
I created a little test app to reproduce this problem: https://github.com/yannickvg/ionic-virtualscroll
Running this app in dev mode works fine. If you run a production build and deploy that to firebase, it will show the following errors.
/workbox-v3.2.0/workbox-sw.js:1 Uncaught SyntaxError: Unexpected token <
at sw.js:1
(anonymous) @ sw.js:1
(index):6 service worker error TypeError: Failed to register a ServiceWorker: ServiceWorker script evaluation failed
This test project is currently deployed on https://fitz-test.firebaseapp.com/ where you can see the errors
Related code:
https://github.com/yannickvg/ionic-virtualscroll
Other information:
No other information
Hi @yannickvg I am having the same issue, did you find a solution?
Just spun up a new project and having the same issue @yannickvg
Hello all! I just pushed an update to fix this issue, thanks!