Basically these two modules do the same thing: emulate an ES2015 environment but in a different way.
In this article I will explain the difference between these two and when you should use one or the other.
This module accomplishes emulating ES2015 by assigning methods on the global (like: Promise and WeakMap) and to prototypes (like Array.prototype.includes). For example: if your environment doesn’t have a Promise object, once you require babel-polyfill, you know have the Promise object, because it was added to the global scope.
This module does something very similar, but it doesn’t change the global namespace or pollute prototypes. Instead, babel-runtime can be included as a dependency of your application, just like any other module, and you can include the ES2015 method from the module.
This however, is too much work, so we use babel-plugin-transform-runtime which we can add to our babel config to automatically rewrite your code such that you write your code using the Promise API and it will be transformed to use the Promise-like object exported by babel-runtime.
More information about setting it up can be found here.