BBVAEngineering / ember-cli-workbox

Offline caching as a progressive enhancement using service workers
MIT License
20 stars 10 forks source link

Add workaround for creating sw.js file for embroider project #123

Open colenso opened 2 years ago

colenso commented 2 years ago

I've taken the inspiration from prember which mentioned that embroider based projects don't support postprocessTree hook of type 'all' and hence we need a way to manually call the function that generates the file. This fixes https://github.com/BBVAEngineering/ember-cli-workbox/issues/122

colenso commented 2 years ago

@adrigzr Would appreciate some 👀 here as well. Thanks!

xomaczar commented 2 years ago

@adrigzr I am having the same issue running this addon with embroider - @colenso PR seems to resolve it. Also, it seems this fix is backward compatible with pre-embroider build pipeline, can this be merged in?

xomaczar commented 2 years ago

@adrigzr have you had a chance to look at @colenso PR?