https://babeljs.io/docs/usage/polyfill/ vs https://babeljs.io/docs/plugins/transform-runtime
The main difference is that polyfill works for all polyfills but must be installed as a production dependency. And you need to use import 'babel-polyfill';
to make it work.
And it will pollute the global scope.
The transform-runtime provides many of the same features, but won't provide special functions like array.includes() or array.values(). So it's safer to use inside a library.
If you're building an app, you can use babel-polyfill. If you're building a library, make sure not to use babel-polyfill, and only the transform-runtime.
You'll need to find alternatives for implementing any of the functions like array.includes or array.values().
Nice and clear! Thanks!