Skip to content

Configure babel-preset-env target to modern browsers (no ie) - #146

Open
blikblum wants to merge 1 commit into
plotly:masterfrom
blikblum:no-ie11
Open

Configure babel-preset-env target to modern browsers (no ie)#146
blikblum wants to merge 1 commit into
plotly:masterfrom
blikblum:no-ie11

Conversation

@blikblum

Copy link
Copy Markdown

Basically removes support to IE11 out of box (those that still need this should compile on their side)

It dramatically improves performance of generated code. Below is an example in a hot code path (as specified by the comment)

before

// this code is called in a tight loopvarcolKey=[];varrowKey=[];var_iteratorNormalCompletion3=true;var_didIteratorError3=false;var_iteratorError3=undefined;try{for(var_iterator3=Array.from(this.props.cols)[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){varx=_step3.value;colKey.push(xinrecord ? record[x] : 'null');}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw_iteratorError3;}}}var_iteratorNormalCompletion4=true;var_didIteratorError4=false;var_iteratorError4=undefined;try{for(var_iterator4=Array.from(this.props.rows)[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var_x16=_step4.value;rowKey.push(_x16inrecord ? record[_x16] : 'null');}}catch(err){_didIteratorError4=true;_iteratorError4=err;}finally{try{if(!_iteratorNormalCompletion4&&_iterator4.return){_iterator4.return();}}finally{if(_didIteratorError4){throw_iteratorError4;}}}

after

// this code is called in a tight loopconstcolKey=[];constrowKey=[];for(constxofArray.from(this.props.cols)){colKey.push(xinrecord ? record[x] : 'null');}for(constxofArray.from(this.props.rows)){rowKey.push(xinrecord ? record[x] : 'null');}

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@blikblum