From ae010ef6493ce18fe43ae69606d65203b05a4b54 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 15 Jan 2020 13:00:11 -0700 Subject: [PATCH] Convert babel config to JS for Jest to pick up --- .babelrc => babel.config.js | 4 ++-- webpack.config.js | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) rename .babelrc => babel.config.js (96%) diff --git a/.babelrc b/babel.config.js similarity index 96% rename from .babelrc rename to babel.config.js index f85eeb4b..8f40b20c 100644 --- a/.babelrc +++ b/babel.config.js @@ -1,4 +1,4 @@ -{ +module.exports = { "sourceMaps": true, "presets": [ ["@babel/preset-env", { @@ -22,4 +22,4 @@ "@babel/plugin-syntax-dynamic-import", "@babel/plugin-transform-runtime" ] -} +}; diff --git a/webpack.config.js b/webpack.config.js index f2496533..1b6d1b3d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -94,15 +94,6 @@ module.exports = (env, argv) => ({ loader: 'babel-loader', options: { cacheDirectory: true, - - // These two options are needed to load the babelrc file and - // apply it to node_modules (ie: react-sdk and js-sdk). We - // could put the babel config in this block instead, but we - // publish riot-web to npm for some reason and that seems to - // ship a lib directory. Therefore, we need the babel config - // in a place where babel and babel-loader can reach it. - babelrc: true, - configFile: path.resolve(__dirname, ".babelrc"), } }, {