Skip to content

Commit

Permalink
metro babel withTamagui
Browse files Browse the repository at this point in the history
  • Loading branch information
LunatiqueCoder committed Jan 5, 2023
1 parent 0fcf929 commit 28a8f53
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions template/babel.config.native.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
// babel.config.js
process.env.TAMAGUI_TARGET = 'native';

module.exports = {
presets: [['module:metro-react-native-babel-preset']],
plugins: ['react-native-reanimated/plugin'],
presets: [
[
'module:metro-react-native-babel-preset',
{useTransformReactJSXExperimental: true},
],
],
plugins: [
'react-native-reanimated/plugin',
[
'@babel/plugin-transform-react-jsx',
{
runtime: 'automatic',
},
],
[
'@tamagui/babel-plugin',
{
components: ['tamagui'],
config: './tamagui',
},
],
// be sure to set TAMAGUI_TARGET
[
'transform-inline-environment-variables',
{
include: 'TAMAGUI_TARGET',
},
],
],
};

0 comments on commit 28a8f53

Please sign in to comment.