ilan-schemoul / meteor-service-worker

An universal service worker for meteor apps
MIT License
137 stars 26 forks source link

Should this work with a react app? #11

Closed vacarsu closed 7 years ago

vacarsu commented 7 years ago

I've implements the service worker and it seems to be caching files, however the page is just blank when I set it to offline in chrome devtools. I get several errors in the service worker 'An unknown error occurred when fetching script'.

screen shot 2017-02-17 at 8 44 20 pm screen shot 2017-02-17 at 8 44 46 pm
ilan-schemoul commented 7 years ago

To answer the title, yes it should. "An unknown error occurred when fetching script" may points out an error in the SW code thus you may want to check again if you copy paste correctly the sw.js. And that you followed the instructions (sw.js in the root of the public folder, register it from a startup code loaded client-side etc.). If you followed correctly the instructions and your web is working without the SW I don't know what's the problem.

ilan-schemoul commented 7 years ago

Could you create a repository with a reproduction if you still have the bug ? Otherwise feel free to close the issue.