From 30588f031e08e6d00aab99346ac6bc4cb7f6ffde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Sj=C3=B6berg?= Date: Wed, 7 Aug 2024 08:29:05 +0200 Subject: [PATCH] chore: Extract babel config from package.json (#299) [skip ci] --- babel.config.js | 24 ++++++++++++++++++++++++ package.json | 21 --------------------- 2 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 babel.config.js diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000..2d40aa60 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,24 @@ +module.exports = (api) => { + api.cache(true); + return { + env: { + test: { + plugins: [ + '@babel/plugin-transform-runtime', + ], + }, + }, + plugins: [ + [ + '@babel/plugin-transform-runtime', + { + regenerator: true, + }, + ], + ], + presets: [ + '@babel/preset-env', + '@babel/preset-react', + ], + }; +}; diff --git a/package.json b/package.json index 5dd60c9d..eff7c809 100644 --- a/package.json +++ b/package.json @@ -78,27 +78,6 @@ "webpack-dev-server": "^5.0.4", "webpack-log": "^3.0.2" }, - "babel": { - "env": { - "test": { - "plugins": [ - "@babel/plugin-transform-runtime" - ] - } - }, - "plugins": [ - [ - "@babel/plugin-transform-runtime", - { - "regenerator": true - } - ] - ], - "presets": [ - "@babel/preset-env", - "@babel/preset-react" - ] - }, "eslintConfig": { "env": { "es6": true,