{"id":28972610,"url":"https://github.com/ember-cli/ember-cli-babel-polyfills","last_synced_at":"2025-06-24T11:07:15.085Z","repository":{"id":57223115,"uuid":"167462655","full_name":"ember-cli/ember-cli-babel-polyfills","owner":"ember-cli","description":"Split-build polyfills for evergreen and legacy browsers","archived":false,"fork":false,"pushed_at":"2019-09-06T18:24:24.000Z","size":430,"stargazers_count":33,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T00:20:03.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-cli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-25T01:09:37.000Z","updated_at":"2025-03-03T16:57:47.000Z","dependencies_parsed_at":"2022-08-24T16:20:53.399Z","dependency_job_id":null,"html_url":"https://github.com/ember-cli/ember-cli-babel-polyfills","commit_stats":null,"previous_names":["pzuraq/ember-cli-babel-polyfills"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-babel-polyfills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-babel-polyfills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-babel-polyfills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-babel-polyfills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-cli","download_url":"https://codeload.github.com/ember-cli/ember-cli-babel-polyfills/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-cli%2Fember-cli-babel-polyfills/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259270871,"owners_count":22832086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-24T11:07:14.417Z","updated_at":"2025-06-24T11:07:15.057Z","avatar_url":"https://github.com/ember-cli.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ember-cli-babel-polyfills\n==============================================================================\n\nThis addon automatically includes a split build of the Babel polyfills in your\nEmber application! This includes three files that are added programmatically\nto your `index.html`:\n\n1. `polyfill-shared.js`\n3. `polyfill-evergreen.js`\n2. `polyfill-legacy.js`\n\nThe shared file contains the common code between both polyfills, while the\nothers contain whatever is unique to them. Importantly, the `polyfill-legacy`\nfile (which is usually the largest!) is marked with the `nomodule` attribute.\nThis attribute _prevents the file from loading_ in all modern browsers, so it\nonly impacts your legacy users. For more details, see the\n[MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-nomodule).\n\n### Why would I want an evergreen polyfill?\n\nIt turns out that browsers almost always have inconsistencies, even when they\naren't updating only once-per-Windows-release! For instance, Microsoft Edge does\nnot yet implement the DOM iterable API as of 01/24/19 (try checking for\n`document.forms[Symbol.iterator]` in the developer console).\n\nThese polyfills are built dynamically using Babel's presetEnv, so they'll stay\nup to date even as the browsers themselves are changing. Best of all, you only\nship the things you care about to modern browsers!\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-cli-babel-polyfills\n```\n\n\nUsage\n------------------------------------------------------------------------------\n\nInstalling the addon will automatically include the polyfills without any\nadditional configuration. You can opt to configure the addon with the following\noptions:\n\n```ts\ninterface EmberCliBabelPolyfillsConfig {\n  legacyTargets?: string[];\n  evergreenTargets?: string[];\n  includeScriptTags?: boolean;\n}\n```\n\n### `evergreenTargets`\n\nThe evergreen browsers you want to support, provided in\n[browserslist](https://github.com/browserslist/browserslist) format. Defaults\nto the following:\n\n```js\nconst evergreenTargets = [\n  'last 2 Chrome versions',\n  'last 2 Firefox versions',\n  'last 2 Safari versions',\n  'last 2 Edge versions',\n  'last 2 ChromeAndroid versions',\n  'last 2 iOS versions',\n]\n```\n\nExample Usage:\n\n```js\n// ember-cli-build.js\n\nlet app = new EmberApp(defaults, {\n  'ember-cli-babel-polyfills': {\n    evergreenTargets: [\n      'last 1 Chrome versions',\n      'last 1 Firefox versions',\n      'last 1 Safari versions',\n    ],\n  },\n});\n```\n\n### `legacyTargets`\n\nThe legacy browsers you want to support, provided in\n[browserslist](https://github.com/browserslist/browserslist) format. Defaults\nto your app's targets.\n\nExample Usage:\n\n```js\n// ember-cli-build.js\n\nlet app = new EmberApp(defaults, {\n  'ember-cli-babel-polyfills': {\n    legacyTargets: [\n      \"last 1 version\",\n      \"\u003e 1%\",\n      \"maintained node versions\",\n      \"not dead\",\n    ],\n  },\n});\n```\n\n### `includeScriptTags`\n\nWhether or not the addon should inject script tags into your content for `body`.\nDefaults to `true`.\n\nExample Usage:\n\n```js\n// ember-cli-build.js\n\nlet app = new EmberApp(defaults, {\n  'ember-cli-babel-polyfills': {\n    includeScriptTags: false,\n  },\n});\n```\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-cli-babel-polyfills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-cli%2Fember-cli-babel-polyfills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-cli%2Fember-cli-babel-polyfills/lists"}