Is your feature request related to a problem? Please describe.
There's no longer a known motivation for transpiling to ES5. Meanwhile, transpiling to ES5 has negatives:
- bundling may need more time and work, due to rolling more polyfills and doing more code transforms
- the bundle is larger and slower, including certain functions in some hot loops, eg. the spread functions
- the larger the transpilation source->target delta, the poorer the job the source map does, and the more mangled the things, leading to impaired dev tools use
Describe the solution you'd like
Identify a new target; not yet sure what it should be, but feel like it should be everything that is an intersection of our code use, and what the evergreen browsers provide. Examples:
- everything ES2015
- all the spreads / destructuring assignments we use, incl. object spread, ...rest etc.
- null coalescing
- optional chaining
I think it'd be a good goal for us to only stick to language constructs that are either in ES2015 or at least, directly supported by the browsers we support as the mainstream. This adds convenience and language expressivity, while does not remove direct mapping to code that the browser runs. Avoids implicitly rolled polyfills that have all kinds of performance costs.
Another motive is that avoidance of polyfills is good practice in that polyfills routinely throw exceptions on otherwise good input, so in many ways, they're temporary hacks.
Kibana Cross Issues
Add any Kibana related issues/feature requests here.
Checklist
Delete any items that are not applicable to this feature request.
Is your feature request related to a problem? Please describe.
There's no longer a known motivation for transpiling to ES5. Meanwhile, transpiling to ES5 has negatives:
Describe the solution you'd like
Identify a new target; not yet sure what it should be, but feel like it should be everything that is an intersection of our code use, and what the evergreen browsers provide. Examples:
I think it'd be a good goal for us to only stick to language constructs that are either in ES2015 or at least, directly supported by the browsers we support as the mainstream. This adds convenience and language expressivity, while does not remove direct mapping to code that the browser runs. Avoids implicitly rolled polyfills that have all kinds of performance costs.
Another motive is that avoidance of polyfills is good practice in that polyfills routinely throw exceptions on otherwise good input, so in many ways, they're temporary hacks.
Kibana Cross Issues
Add any Kibana related issues/feature requests here.
Checklist
Delete any items that are not applicable to this feature request.
Kibana Cross Issueslistkibana cross issuetag is associated to the issue if any kibana cross issue is present