babel: IE8 raises `Expected identifier` exception on `browser-polyfill.js`
babel-core/browser-polyfill.js
on a fresh npm install contains iterator.throw
and iterator.return
(rather than ["throw"]
and ["return"]
) which consequently makes it incompatible with older browsers.
The actual error was fixed in regenerator a few days ago, but the npm version of babel still installs the old syntax https://github.com/facebook/regenerator/commit/97466d3d540243702496b24426765f0022f4bc07
To reproduce, I just freshly npm installed babel-core and searched for .throw
in resulting browser-polyfill.js
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 20 (9 by maintainers)
Commits related to this issue
- chore: support ie8 needs one more thing from babel, see: https://github.com/babel/babel/issues/1286 — committed to iam4x/isomorphic-flux-boilerplate by iam4x 9 years ago
@theredpea I’m noticing this as well on v6.26.0
I’m having this issue as well: line 7178 of the unminified script has
deletgate.iterator.return
. Additionally there is a reserved worddelete:
in the minified script so neither will load for me in IE8 now. Confirmed in7.0.0-beta.56
and6.26.0
.I thought this was babel problem but remidied (partially, so far…) with
new UglifyJsPlugin({ ..., uglifyOptions: { ..., ie8: true } })
@sebmck related. IIRC,
uglify
not transformiterator["throw"]
->iterator.throw
, looks like simply need rebuildbrowser-polyfill
with latestregenerator
.