diff --git a/babel.config.js b/babel.config.js index 1236d4f4..1ffee43c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,30 +1,29 @@ module.exports = function (api) { api.cache(false) + const plugins = [ + '@babel/plugin-proposal-optional-chaining', + [ + 'module-resolver', + { + root: ['./'], + alias: { + '@assets': './assets', + '@root': './src', + '@api': './src/api', + '@helpers': './src/helpers', + '@components': './src/components', + '@screens': './src/screens', + '@utils': './src/utils' + } + } + ], + 'react-native-reanimated/plugin' + ] + if (process.env.NODE_ENV === 'production' || process.env.BABEL_ENV === 'production') { plugins.push('transform-remove-console') } - return { - presets: ['babel-preset-expo'], - plugins: [ - '@babel/plugin-proposal-optional-chaining', - [ - 'module-resolver', - { - root: ['./'], - alias: { - '@assets': './assets', - '@root': './src', - '@api': './src/api', - '@helpers': './src/helpers', - '@components': './src/components', - '@screens': './src/screens', - '@utils': './src/utils' - } - } - ], - 'react-native-reanimated/plugin' - ] - } + return { presets: ['babel-preset-expo'], plugins } } diff --git a/src/screens/Compose.tsx b/src/screens/Compose.tsx index 07225f22..a47e613b 100644 --- a/src/screens/Compose.tsx +++ b/src/screens/Compose.tsx @@ -258,7 +258,7 @@ const ScreenCompose: React.FC> = ({ > = ({ : 'default' : params.type)) || 'default' - }` as any + }` )} onPress={() => { composeDispatch({ type: 'posting', payload: true })