diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..f2a2e0d --- /dev/null +++ b/.babelrc @@ -0,0 +1,19 @@ +{ + "presets": [ + "@babel/preset-env", + "@babel/preset-react" + ], + "plugins": [ + "react-hot-loader/babel", + "@babel/plugin-proposal-class-properties" + ], + "env": { + "test": { + "plugins": [ + ["istanbul", { + "exclude": ["node_modules/**", "test/**"] + }] + ] + } + } +} diff --git a/config/webpack.rules.js b/config/webpack.rules.js index 496be43..08338f8 100644 --- a/config/webpack.rules.js +++ b/config/webpack.rules.js @@ -6,28 +6,7 @@ module.exports = [ exclude: [ path.resolve(__dirname, '../node_modules') ], - use: { - loader: 'babel-loader', - options: { - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ], - "plugins": [ - "react-hot-loader/babel", - "@babel/plugin-proposal-class-properties" - ], - "env": { - "test": { - "plugins": [ - ["istanbul", { - "exclude": ["node_modules/**", "test/**"] - }] - ] - } - } - } - } + use: 'babel-loader' }, { test: /\.(eot|ttf|woff|woff2)$/,