const debug = process.env.DEBUG === 'timpla' const isProduction = process.env.NODE_ENV === 'production' module.exports = { presets: [ [ '@babel/preset-env', { // usage automatically injects @babel/polyfill, so older browsers may still work // see https://babeljs.io/docs/en/babel-polyfill // We're only loading this for production builds so development compilation times are faster! ...(isProduction && { useBuiltIns: 'usage' }), debug, }, ], '@babel/preset-typescript', '@babel/preset-react', ], plugins: ['@babel/plugin-syntax-dynamic-import', 'react-hot-loader/babel'], }