Created by: selbekk
This commit adds babel-plugin-root-import
to the default .babelrc
file to define ~
as the absolute path to the src/
folder.
This gives us the possibility to turn code like this:
import SomeUtility from '../../utils/some-utility'
to this
import SomeUtility from '~/utils/some-utility';
The main upside of using this pattern in contrary to the approaches suggested in #741 (closed) is that it highlights what is a local import and what is a node_module
import.
Fixes #849 (closed).