bezoerb / generator-grunt-symfony

[DEPRECATED] Yeoman generator that scaffolds out a Symfony PHP app including Browsersync, various CSS preprocessors, RequireJS, jspm, webpack and Service Worker
33 stars 5 forks source link

Service Worker configured to load "prod" styles on "dev" results in 404 #209

Open FossPrime opened 7 years ago

FossPrime commented 7 years ago

The 404 errors get annoying in the console. Not quite sure what the benefit of including it service-worker.js is. We could do a debug exclude, or not include it on the hard list, or router around it.

I don't see much benefit to having main.md5hash.css in precache... it's already on the html by the time the sw runs. Or perhaps it would be better to do a quick prod cleanup before running in dev mode.

thoughts?

UPDATE: Sample error:

/service-worker.js:132 Request for http://localhost:8000/styles/main.7af9a142.css?sw-precache=1473853567887 returned a response with status 404, so not attempting to cache it.