unimelb / unimelb-design-system

A complete design system for the University of Melbourne
https://web.unimelb.edu.au
30 stars 12 forks source link

Switch to babel-preset-env #870

Closed axelboc closed 7 years ago

axelboc commented 7 years ago

babel-preset-env performs only the transforms required for the target environment (i.e. the list of supported browsers), as opposed to the previous preset babel-preset-2015 which was performing all ES2015 transforms no matter what.

Basically, if one day all supported browsers support some new JS syntax, then that syntax won't be transformed to ES2015. This is not very useful right now since we still support IE9, but it will be when the list of supported browsers changes in the future. Moreover, Babel is about to deprecate babel-preset-2015 in favour of babel-preset-env.