babel / babel/minify

Integration with preset-env - compile target option

Open
#428 1 comment 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
4.4k
Forks
217
PR merge metrics
No merged PRs in 30d

Description

Prior art:
> https://github.com/babel/babili/pull/387#issuecomment-274878437

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.