pwa icon indicating copy to clipboard operation
pwa copied to clipboard

Add Conditionally loaded fetch and promise polyfill

Open anubhav7495 opened this issue 7 years ago • 3 comments

I think that we should also have an option asking the user for whether he wants to include polyfills for fetch and promise that are loaded conditionally using webpack.

I have seen preact-cli do that and I think it would be a nice to have feature.

Or we can also put in the documentation on how to set that up manually.

@addyosmani @ragingwind What are your thoughts?

anubhav7495 avatar Aug 09 '17 18:08 anubhav7495

As I understand, it is assumed that those of polyfills in preact-cli are used only in case of SSR. (not pretty much sure about promise). I think we can add SSR / Client hydration feature to this PWA template with polyfills. Documentation is not enough to encourage people to adapt SSR feature themselves.

ragingwind avatar Aug 10 '17 09:08 ragingwind

I found this, discussion on SSR https://github.com/vuejs-templates/pwa/issues/33

ragingwind avatar Aug 11 '17 14:08 ragingwind

The ServiceWorker API is built on Promises. I don't think a Promise polyfill is needed:

https://caniuse.com/#feat=promises https://caniuse.com/#feat=serviceworkers

I don't think for Fetch either: https://caniuse.com/#feat=fetch

MichaelJCole avatar Feb 14 '18 01:02 MichaelJCole