react-native-css-modules icon indicating copy to clipboard operation
react-native-css-modules copied to clipboard

CSS LESS is Not working

Open ser0ja opened this issue 4 years ago • 0 comments

"expo": "40.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz"

I checked each step according to the proposed instructions (https://github.com/kristerkari/react-native-css-modules/blob/master/docs/setup-less.md), but not working. Not for web, not for android

metro.config.js

const { getDefaultConfig } = require('@expo/metro-config')
module.exports = (async () => {
    const { resolver: { sourceExts } } = await getDefaultConfig(__dirname)
    return {
        transformer: {
            babelTransformerPath: require.resolve('react-native-less-transformer')
        },
        resolver: {
            sourceExts: [...sourceExts, 'less']
        }
    }
})()
import theme from './layout.less'
<View className={theme.layout}>

ser0ja avatar Jan 22 '21 12:01 ser0ja