Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gwuhaolin/ie-babel-class
- Owner: gwuhaolin
- Created: 2016-10-29T12:20:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-13T03:00:55.000Z (almost 8 years ago)
- Last Synced: 2024-10-08T02:06:42.886Z (30 days ago)
- Topics: babel, ie
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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/