Open MrCsabaToth opened 3 years ago
In the faulty sw.js generated file the wildcard pattern repeats ~85 times! Hence we get the add-to-cache-list-conflicting-entries
Yeah, the code is pretty naive unfortunately. I'm not using Jekyll and this plugin currently, and don't really have time to look into it. But feel free to send a PR.
Yeah, the code is pretty naive unfortunately. I'm not using Jekyll and this plugin currently, and don't really have time to look into it. But feel free to send a PR.
I'll need to learn Ruby for that. I'll peek into https://github.com/souldanger/jekyll-pwa-workbox/ maybe I can figure out something
When I have only some simple aliases then it's OK: My sw.js:
My _config.yaml:
Generated sw.js:
So far so good. When I add
- "{fonts,images}/**/*.{js,css,svg,ttf,woff,jpg,png,webp}"
to theprecache_glob_patterns
because I want to cache images as well (besides the default), then the code generator duplicates that pattern gazillions of times, and a Lighthouse test brings the situation to the point that the service worker layer errors out and results inUncaught add-to-cache-list-conflicting-entries: Two of the entries passed to 'workbox-precaching.PrecacheController.addToCacheList()' had matching URLs but different revision details. This means workbox-precaching is unable to determine cache the asset correctly. Please remove one of the entries.
Generated sw.js: