Polyfill/Core-JS not Included with Versions 7+
See original GitHub issueThe latest versions of this repo do not appear to include the core-js
polyfill when configuring:
'ember-cli-babel': {
includePolyfill: true
}
…in the ember-cli-build.js
file.
Here’s a branch demonstrating the issue, with a failing test: https://github.com/spencer516/babel-issue/tree/babel-7
Here’s the same, but with version 6.16
, with a passing test: https://github.com/spencer516/babel-issue/tree/babel-6
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
core-js - npm
Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2023: promises, symbols, collections, iterators, typed arrays, ...
Read more >Module not found: Error: Can't resolve 'core-js/es6'
To resolve this error, you can downgrade the core-js version to 2.5.7. This version produces correct catalogs structure, with separate ES6 ...
Read more >7.4.0 Released: core-js 3, static private methods and partial ...
This release includes support for TypeScript 3.4, the proposal for partial application in function calls, and static private methods. We added ...
Read more >Browser support - Angular
This includes the following specific versions: ... You might need additional polyfills to support features not covered by this list.
Read more >How to load polyfills only when needed
If you use core-js 2, useBuiltIns: "usage" will fail to add some of the newer polyfills. For example, it won't polyfill this code:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Frozenfire92 Here is my solution.
Install the cjs transform addon (https://github.com/rwjblue/ember-cli-cjs-transform):
ember install ember-cli-cjs-transform
Import the file in
ember-cli-build.js
:In app.js, import the module (using the alias you defined)
@rwjblue I don’t know who is the maintainer of this package, but my recommadation would be to close this issue as it is not a problem with ember-cli-babel, but a breaking change in babel 7 where by the polyfill file no longer includes polyfills for < Stage 4 proposals (as @Frozenfire92 mentioned above).
@spencer516 and the example he included is just that flatMap is not included with the polyfills file.
I have posted a work around / solution for including < stage 4 proposals that should help with the migration from ember-cli-babel 6.x.x to 7.x.x