Registry / web-framework / ember-cli-babel-polyfills

ember-cli-babel-polyfills

JSON →
library2.0.1jsnpmunverified

An Ember addon (v2.0.1, latest) that automatically produces split builds of Babel polyfills (using core-js directly since v2.0.0) for evergreen and legacy browsers. It injects three script tags into index.html: polyfill-shared.js, polyfill-evergreen.js, and polyfill-legacy.js (the latter with nomodule attribute to skip modern browsers). Key differentiator: dynamic polyfill generation via Babel's presetEnv, so only necessary polyfills are shipped to each browser category. Suitable for Ember apps using Babel 7+; drops support for Babel 6 in v2.

npm install ember-cli-babel-polyfills
INSTALL
IMPORT
SIG · EMBER-CLI-BABEL-PO
E
ember-cli-babel-polyfills
web-frameworkjavascriptv2.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (addon)
ember install ember-cli-babel-polyfills
npm install ember-cli-babel-polyfills --save-dev
Install as an Ember addon via ember install; direct npm install may miss blueprint steps.
EmberCliBabelPolyfillsConfig
import type { EmberCliBabelPolyfillsConfig } from 'ember-cli-babel-polyfills';
Type is exported for TypeScript config usage, but not a runtime value.
Configuration in ember-cli-build.js
let app = new EmberApp(defaults, { 'ember-cli-babel-polyfills': { evergreenTargets: [...] } });
let app = new EmberApp(defaults, { babelPolyfills: { ... } });
Key must be the addon name as string; common mistake is using a different key.

Installs the addon and shows basic configuration for customizing browser targets.

// Install the addon ember install ember-cli-babel-polyfills // No further configuration needed; polyfills are auto-added. // To customize targets, edit ember-cli-build.js: let app = new EmberApp(defaults, { 'ember-cli-babel-polyfills': { evergreenTargets: [ 'last 2 Chrome versions', 'last 2 Firefox versions', 'last 2 Safari versions', ], legacyTargets: [ 'last 1 version', '> 1%', 'not dead', ], includeScriptTags: true, }, });
Debug
Known issues
breakingv2.0.0 drops support for Babel 6 and switches from @babel/polyfill to core-js directly.
fix
Upgrade to Babel 7 and ensure your app uses ember-cli-babel ^7.0.0.
affects: >=2.0.0
gotchaThe addon expects ember-cli-build.js configuration key to be exactly 'ember-cli-babel-polyfills' (string).
fix
Use string key 'ember-cli-babel-polyfills' in EmberApp options.
affects: *
gotchaincludeScriptTags: false will not inject any script tags; you must manually add them.
fix
Set includeScriptTags: true or manually add polyfill scripts to your index.html.
affects: *
Errors
Common errors & fixes
Error: Could not find module `ember-cli-babel-polyfills`
Addon not installed via ember install or missing from package.json.
fix
Run 'ember install ember-cli-babel-polyfills'.
TypeError: Cannot read property 'polyfill' of undefined
Using v2+ with Babel 6; the addon now requires core-js from Babel 7.
fix
Upgrade to Babel 7 and ember-cli-babel >=7.0.0.
Polyfill scripts not appearing in index.html
Configuration includeScriptTags set to false or overridden by another addon.
fix
Set includeScriptTags: true in ember-cli-build.js or ensure no addon removes them.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
ember-cli-babelrequiredRequired for Babel transpilation in Ember; the addon builds on top of it to generate polyfills.
Agent activity
6 hits · last 30 days
node
6
Resources
ember-cli-babel-polyfills — npm install ember-cli-babel-polyfills · libregistry