SebastianS90 / webpack-polyfill-injector

Webpack plugin to automatically inject polyfills into your bundle without affecting modern browsers.
MIT License
82 stars 10 forks source link

Load from polyfill.io #29

Open garygreen opened 5 years ago

garygreen commented 5 years ago

Instead of creating thousands of individual polyfill files (or one big one), it would be neat to have an option of loading them from https://polyfill.io directly

This would invalidate the argument in the readme that it avoids a CDN, but it's a fair compromise to load individual/needed polyfills from a CDN than having thousands of files in your build.

Looking at the code, I believe it would be fairly straight forward to add this in. Maybe an option like fromCdn: true/false

SebastianS90 commented 5 years ago

Thanks for your suggestion. Unfortunately I don't have enough time right now to implement it myself, but feel free to post a PR for this. Otherwise I'll leave it open until I have more time or someone else picks it.

vdh commented 3 months ago

You may want to avoid this now anyway, seeing as it appears that the domain got compromised: https://www.theregister.com/2024/06/25/polyfillio_china_crisis/?td=rt-3a