DEV Community

Discussion on: No More ../../../ Import in React

Collapse
gene profile image
Gene

I'd use babel-module-resolver for this case. Much neater.

import {Button} from '../../components/Button';
// vs
import {Button} from '@components'
Enter fullscreen mode Exit fullscreen mode

Some comments have been hidden by the post's author - find out more