Only compile down imports during tests

This commit is contained in:
David Edmondson 2021-08-26 17:02:02 -07:00
parent 701fba7ec7
commit feaa74ed34
2 changed files with 9 additions and 7 deletions

@ -1,7 +0,0 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
]
}

9
babel.config.js Normal file

@ -0,0 +1,9 @@
const TEST = process.env.NODE_ENV === "test";
module.exports = {
"presets": [
"@babel/preset-react",
TEST && "@babel/preset-env",
TEST && "@babel/preset-typescript",
].filter(Boolean),
}