Skip to content

Commit

Permalink
WIP - Babel 7 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalduez committed Feb 18, 2018
1 parent c60eb80 commit ba8264b
Show file tree
Hide file tree
Showing 5 changed files with 1,190 additions and 1,199 deletions.
16 changes: 10 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
* https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy
* https://babeljs.io/docs/plugins/transform-decorators
*
* [React/Flow]
* [React]
* https://babeljs.io/docs/plugins/preset-react
*
* [Flow]
* https://babeljs.io/docs/plugins/preset-flow
*
* [Other]
* https://babeljs.io/docs/plugins/transform-runtime
*/
Expand All @@ -24,22 +27,23 @@ module.exports = (context, options) => {
};

const presets = [
['env', Object.assign(defaults, options)],
'react'
['@babel/env', Object.assign(defaults, options)],
'@babel/react',
'@babel/flow',
];

const plugins = [
[
'transform-runtime',
'@babel/transform-runtime',
{
helpers: true,
polyfill: true,
regenerator: true,
},
],
'transform-class-properties',
'@babel/proposal-object-rest-spread',
'@babel/proposal-class-properties',
'transform-decorators-legacy',
'transform-object-rest-spread',
];

return {
Expand Down
Loading

0 comments on commit ba8264b

Please sign in to comment.