Was taken from https://github.com/kentcdodds/testing-workshop/tree/master/other/configuration/calculator.solution
{
"babel": {
"presets": "./.babelrc.js"
}
}
const isTest = String(process.env.NODE_ENV) === 'test'
module.exports = {
presets: [['env', {modules: isTest ? 'commonjs' : false}], 'react'],
plugins: [
'syntax-dynamic-import',
'transform-class-properties',
'transform-object-rest-spread',
isTest ? 'dynamic-import-node' : null,
].filter(Boolean),
}