digitransit-ui icon indicating copy to clipboard operation
digitransit-ui copied to clipboard

fix or replace offline-plugin

Open derhuerst opened this issue 3 years ago • 5 comments

Follow-up of #4607.

offline-plugin doesn't work with Webpack 5 and seems unmaintained: https://github.com/NekR/offline-plugin/issues/497

Personally, I haven't seen the offline caching work with digitransit-ui. Has someone seen it work recently?

derhuerst avatar Sep 22 '22 10:09 derhuerst

Yes it does work but u have to edit https://github.com/HSLdevcom/digitransit-ui/blob/v2/app/buildInfo.js#L2 to make it work.

optionsome avatar Sep 22 '22 11:09 optionsome

Yes it does work but u have to edit […] to make it work.

Is that deployed somewhere?

derhuerst avatar Sep 22 '22 14:09 derhuerst

Yes it does work but u have to edit […] to make it work.

Is that deployed somewhere?

https://reittiopas.hsl.fi/etusivu for example. Also, if I don't remember wrong, I think having a service worker was a requirement for PWAs to work.

optionsome avatar Sep 22 '22 15:09 optionsome

https://reittiopas.hsl.fi/etusivu for example.

Indeed, there is a service worker in place.

How do I check if the offline support works? When turning off my laptops internet connection and reloading, I can't use the Reittiopas website offline.

derhuerst avatar Sep 23 '22 12:09 derhuerst

Indeed, there is a service worker in place.

How do I check if the offline support works? When turning off my laptops internet connection and reloading, I can't use the Reittiopas website offline.

Oh, I don't think it does work offline necessarily. The service worker is just there so we have more control over the caching behaviour and for the PWA support.

optionsome avatar Sep 23 '22 12:09 optionsome