jschr / electron-react-redux-boilerplate

A minimal boilerplate to get started with Electron, React and Redux.
556 stars 130 forks source link

Add babel-preset-env #60

Closed pronebird closed 6 years ago

pronebird commented 6 years ago

This PR migrates the babel configuration to babel-preset-env, which automatically picks the preset to transpile the code based on the target environment.

Since we use Electron 1.8 which internally runs Node 7.x, I enabled the useBuiltIns: true option to polyfill even less since a lot of modern JavaScript features are supported natively.

transform-object-rest-spread is needed because there were some issues in Babel 6 parser, however we'll be able to drop it once upgraded to the next stable Babel. It's just that each time I look at Babel, it remains in beta and I'd like things to settle before upgrading to the latest.

jschr commented 6 years ago

👍