Skip to content

Commit

Permalink
fix: use just one babel file
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniAcu committed Sep 13, 2021
1 parent 948b737 commit 2944ade
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 26 deletions.
33 changes: 20 additions & 13 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
const testingConfig = require('./babel.test.config')

module.exports = api => {
const isTest = api.env('test');

if(isTest) return testingConfig;

return {
presets: [
'@babel/preset-env',
'@babel/preset-typescript'
]
};
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript'
],
env: {
test: {
presets: [
[
'@babel/preset-env',
{
"targets": {
"node": "current"
}
}
],
'@babel/preset-typescript'
]
}
}
};
13 changes: 0 additions & 13 deletions babel.test.config.js

This file was deleted.

0 comments on commit 2944ade

Please sign in to comment.