Example: top-level import
You can import all polyfills at the beginning of your top-level app file. This is the easiest approach. The result is slower performance for modern browsers that don’t need all the polyfills:
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'whatwg-fetch';
import 'fast-text-encoding';
if (!window.crypto && window.msCrypto) {
window.crypto = window.msCrypto;
}
if (!Element.prototype.remove) {
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
};
}