Skip to content

CSS LESS is Not working #38

Open
Open
@ser0ja

Description

@ser0ja
"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}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions