ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

babel-preset-env usage adjustment #531

Open strues opened 6 years ago

strues commented 6 years ago

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 😕

ctrlplusb commented 6 years ago

Interesting, thanks for tracking the updates @strues

ctrlplusb commented 6 years ago

@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?