using alias in import pathes

hi there,

Using the latest expo-cli. to avoid something like ‘./src/foo/bar’ i want to set aliasses in the babel.config. Installed module-resolver and added this to the babel.config:

    plugins: [
        ['module-resolver', {
            root: ['./src'],
            alias: {
                'components': './src/components',

but still the server can not resolve an import like
import Map from ‘components/Map.js’

any hints what is missing?


1 Like