Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gwuhaolin/ie-babel-class

polyfill for use babel translate es6 for IE<=9 which use class super constructor
https://github.com/gwuhaolin/ie-babel-class

babel ie

Last synced: 8 days ago
JSON representation

polyfill for use babel translate es6 for IE<=9 which use class super constructor

Awesome Lists containing this project

README

        

### polyfill for use babel translate es6 for IE<=9 which use class super constructor

this code use babel translate to es5 and run in IE<=9,
```
class TestSuper {
constructor() {
console.log('TestSuper constructor');
}
}

class Test extends TestSuper {
constructor() {
console.log('Test constructor');
super();
}
}

export default Test;
```
will course error:
```
Unable to get value of the property '***': object is null or undefined
```

use this as polyfill will fix it.

#### install
```
npm i ie-babel-class
```
then import is before any js.
see
- https://github.com/babel/babel/issues/3041
- http://fedvic.com/2016/01/15/extendInBabel/