Axel
Axel

Reputation: 5111

Expo react native not using plugin defined in babel.config.js

So I am using minimal workflow with Typescript and I have this in babel.config.js,

module.exports = function (api) {
    api.cache(true)
    return {
        presets: ["babel-preset-expo"],
        plugins: [
            [
                "module-resolver",
                {
                    root: ["."],
                    alias: {
                        "lib/": "./"
                    }
                }
            ]
        ]
    }
}

As you can see I am using babel-plugin-module-resolver to alias path. But it's not working at all. What am I doing wrong here?

Upvotes: 0

Views: 1131

Answers (1)

Axel
Axel

Reputation: 5111

I needed to clear cache. yarn ios -- -c

Upvotes: 2

Related Questions