-
|
Hello, everyone! I integrated uniwind into my application instead of nativewind 2.0, and I am experiencing an issue. I added import globals.css to App.tsx, but whenever I change the classes, the application restarts. What did I do wrong? My metro config: const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config')
const {
wrapWithReanimatedMetroConfig,
} = require('react-native-reanimated/metro-config')
const { withUniwindConfig } = require('uniwind/metro')
const {
withSentryConfig
} = require('@sentry/react-native/metro')
const defaultConfig = getDefaultConfig(__dirname)
const extraResolver = {
resolver: {
...defaultConfig.resolver,
sourceExts: [...defaultConfig.resolver.sourceExts, 'cjs'],
conditionNames: ['react-native', 'require', 'default'],
},
}
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('@react-native/metro-config').MetroConfig}
*/
module.exports = withSentryConfig(
wrapWithReanimatedMetroConfig(withUniwindConfig(mergeConfig(defaultConfig, extraResolver), {
cssEntryFile: './src/global.css',
dtsFile: './src/types/uniwind-types.d.ts'
}))
)UPD: when i save any file - app reload |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
|
Looks like you put
I would double check how your You can generate new project eg. with:
and see how it should work and behave. |
Beta Was this translation helpful? Give feedback.
I guess i fixed it. The problem is that I am importing
'./global.css'in App.tsx AND right here i wrapped my component into<View className='flex-1'>.I moved it into Providers.tsx and now seems like working well. I think it's worth mentioning this in the documentation