From 92a1be83b60df6bd8f18daf131eee8d242cc2ff8 Mon Sep 17 00:00:00 2001 From: orangemug Date: Tue, 9 Oct 2018 20:45:03 +0100 Subject: [PATCH] Moved babel config back out into .babelrc This is due to .babelrc being used for other tooling. --- .babelrc | 19 +++++++++++++++++++ config/webpack.rules.js | 23 +---------------------- 2 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 .babelrc 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)$/,