diff --git a/.babelrc b/.babelrc deleted file mode 100644 index e82f99b3..00000000 --- a/.babelrc +++ /dev/null @@ -1,46 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "useBuiltIns": "entry", - "loose": true - } - ], - "@babel/preset-react", - "@babel/preset-flow" - ], - "plugins": [ - "react-hot-loader/babel", - "@babel/plugin-transform-flow-strip-types", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-object-rest-spread", - [ - "@babel/plugin-transform-runtime", - { - "regenerator": true - } - ], - [ - "module-resolver", - { - "root": [ - "./src" - ], - "alias": { - "public": [ - "./public" - ] - } - } - ], - "babel-plugin-styled-components" - ], - "env": { - "test": { - "presets": [ - "jest" - ] - } - } -} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000..5556ac0f --- /dev/null +++ b/babel.config.js @@ -0,0 +1,50 @@ +module.exports = (api) => { + api.cache(true); + + return { + presets: [ + [ + '@babel/preset-env', + { + useBuiltIns: 'entry', + loose: true, + }, + ], + '@babel/preset-react', + '@babel/preset-flow', + ], + plugins: [ + 'react-hot-loader/babel', + '@babel/plugin-transform-flow-strip-types', + '@babel/plugin-proposal-class-properties', + '@babel/plugin-proposal-object-rest-spread', + [ + '@babel/plugin-transform-runtime', + { + regenerator: true, + }, + ], + [ + 'module-resolver', + { + root: [ + './src', + ], + alias: { + public: [ + './public', + ], + }, + }, + ], + 'babel-plugin-styled-components', + ], + env: { + test: { + presets: [ + 'jest', + ], + }, + }, + }; +}; \ No newline at end of file