# First install the package yarn add babel-polyfill --dev # or npm add babel-polyfill --dev # Then require it in the angular.json "scripts": ["node_modules/babel-polyfill/dist/polyfill.min.js"]