Tamagui config file being skipped on expo app #2457
Replies: 1 comment
-
The issue was that we were targeting es5 in our tsconfig file. Changing to ESNext fixed the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! I am trying to use tamagui in my expo app, but when the js is being bundled, I am getting a bunch of console warnings and errors related to tamagui config. Since this happens when the JS is being bundled, I assume it's an issue with metro and how tamagui plays with it. Some help would be appreciated. Thanks!
This is my tamagui.config.ts file:
`
import { config } from '@tamagui/config/v3'
import { createTamagui } from 'tamagui'
import theme from './constants/theme'
export const tamaguiConfig = createTamagui({
...config,
themes: { ...theme },
})
export type Conf = typeof tamaguiConfig
declare module 'tamagui' {
interface TamaguiCustomConfig extends Conf {}
}
export default tamaguiConfig
`
And this is my babel.config.js file
module.exports = function (api) { api.cache(true) return { presets: ['babel-preset-expo'], plugins: [ 'react-native-reanimated/plugin', [ '@tamagui/babel-plugin', { components: ['tamagui'], config: './tamagui.config.ts', importWhiteList: ['constants/theme.ts'], logTimings: true, disableExtraction: process.env.NODE_ENV === 'development', }, ], ], } }
These are the errors:
tamagui: skipping (appname)/tamagui.config.ts tamagui.dev/docs/intro/errors#warning-001
Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config
Cannot convert object to primitive value
Warning: Tamagui didn't find any valid components (DEBUG=tamagui for more)
Beta Was this translation helpful? Give feedback.
All reactions