Prior art:
#387 (comment)
Some optimizations which involve creating new functions or replacing or adding new functions or variables could be simplified to use the newer JS syntax (arrow functions, object methods, shorthand properties, default params, etc...). But we need an option to specify the target language version.
With babel-preset-env data it is possible to specify the target browsers, nodejs versions and use a particular feature - say arrow-functions, or spread-operator based on the computed values.
Prior art:
Some optimizations which involve creating new functions or replacing or adding new functions or variables could be simplified to use the newer JS syntax (arrow functions, object methods, shorthand properties, default params, etc...). But we need an option to specify the target language version.
With
babel-preset-envdata it is possible to specify the target browsers, nodejs versions and use a particular feature - sayarrow-functions, orspread-operatorbased on the computed values.