I'm very much interested to use ES6 features in my current project. I checked out and found couple of options: TypeScript and Babel. I'm planning to try Babel. My worry is, the code I write in babel after traspiling can it safely run in IE9? or do I need polyfills still?
Asked
Active
Viewed 123 times
0
-
I'm inclined to say Nothing can safely run in IE9. – webduvet Apr 13 '16 at 13:36
1 Answers
1
Yes, code generated by Babel will run in IE9 (there are caveats, you need to use plugins in Babel 6).
However, Babel only transpiles ES2015/6 language features (new syntax changes, keywords, etc). If you want to use ES6 built-ins such as Promise
, WeakSet/Map
and so on, you will need a polyfill for non-compliant browsers.

Community
- 1
- 1

CodingIntrigue
- 75,930
- 30
- 170
- 176
-
1And some new syntax features depend on new library features, so if you don't polyfill, you can't use those either, like `for...of` with `Symbol.iterator`. – loganfsmyth Apr 13 '16 at 16:58
-
Can Babel import `@babel/polyfill` by default? Do I have to import it in my app? – Will Huang Jan 28 '19 at 16:17