module . exports = function create ( _api , _opts , env ) { const isEnvDevelopment = env === 'development' ; const isEnvProduction = env === 'production' ; const isEnvTest = env === 'test' ; const replacements = [ { original : 'lodash' , replacement : 'lodash-es' } ] ; return { presets : [ isEnvTest && [ require ( '@babel/preset-env' ) . default , { targets : { node : 'current' } } , ] , isEnvProduction && [ require ( '@babel/preset-env' ) . default , { useBuiltIns : 'entry' , corejs : 3 , exclude : [ 'transform-typeof-symbol' ] , targets : '> 0.25%, not dead, not op_mini all' } , ] , isEnvDevelopment && [ require ( '@babel/preset-env' ) . default , { useBuiltIns : 'entry' , corejs : 3 , exclude : [ 'transform-typeof-symbol' ] } , ] , [ require ( '@babel/preset-react' ) . default , { development : isEnvDevelopment || isEnvTest , useBuiltIns : true , runtime : 'automatic' } , ] , require ( '@babel/preset-typescript' ) , ] . filter ( Boolean ) , plugins : [ require ( '@babel/plugin-proposal-optional-chaining' ) , require ( '@babel/plugin-proposal-nullish-coalescing-operator' ) , ! isEnvTest && require ( 'babel-plugin-styled-components' ) , require ( 'babel-plugin-module-resolver' ) , require ( 'babel-plugin-macros' ) , require ( 'babel-plugin-annotate-pure-calls' ) , require ( 'babel-plugin-dev-expression' ) , [ require ( 'babel-plugin-transform-rename-import' ) , { replacements } ] , [ require ( '@babel/plugin-proposal-decorators' ) . default , false ] , [ require ( '@babel/plugin-proposal-class-properties' ) . default , { loose : true } , ] , [ require ( '@babel/plugin-proposal-private-methods' ) . default , { loose : true } , ] , [ require ( '@babel/plugin-proposal-private-property-in-object' ) . default , { loose : true } , ] , require ( '@babel/plugin-proposal-numeric-separator' ) . default , [ require ( '@babel/plugin-transform-runtime' ) . default , { corejs : false , helpers : true , regenerator : true , useESModules : false , version : require ( '@babel/runtime/package.json' ) . version } , ] , require ( '@babel/plugin-syntax-dynamic-import' ) . default , isEnvTest && require ( 'babel-plugin-dynamic-import-node' ) , ] . filter ( Boolean ) , overrides : [ { test : /\.tsx?$/ , plugins : [ [ require ( '@babel/plugin-proposal-decorators' ) . default , { legacy : true } , ] , ] } , ] } ; } ;