Created by: heygrady
Some of the advanced babel-preset-react-app
customizations inadvertently re-enable plugins that @babel/preset-env
disables (based on browserslist).
I ran into this issue while enabling modern builds for my application. I noticed that destructure and spread transforms were being applied even for very future-forward browser targets like last 1 chrome version
.
This PR uses some of the internals of @babel/preset-env
@babel/helper-compilation-targets
and @babel/compat-data
to know which plugins to apply and disables some customizations when they are not necessary given the browser targets.