react-universally icon indicating copy to clipboard operation
react-universally copied to clipboard

babel-preset-env usage adjustment

Open strues opened this issue 7 years ago • 2 comments

This switches how babel-preset-env is used. Currently we look like

['env', { 
     es2015: { modules: false }
}]

The es2015 portion was dropped a while back if I remember right. Nothing in the babel docs mentions using it any more. Figured we'd reflect the documentation.

As a side note, running the preset w/ debug: true appears to produce the exact same output 😕

strues avatar Oct 19 '17 18:10 strues

Interesting, thanks for tracking the updates @strues

ctrlplusb avatar Oct 20 '17 08:10 ctrlplusb

@strues so I believe the original intention of ignoring modules was because webpack understands es modules and we wanted webpack to do any possibly optimisations it could (dead code elimination / tree shaking). I checked create-react-app which is a great benchmark for babel configurations and it appears they are still ignoring modules too - likely for the reason I just described. Thoughts?

ctrlplusb avatar Oct 23 '17 09:10 ctrlplusb