In my project structure, I have some top level directories such as
components/
constants/
util/
test/, etc
I do the following when I have to import a module from util
in components/App
import { formatDate } from '../../util/dateUtil'
This becomes cumbersome when modules are deeply nested. Is there a better way to do this? Something like:
import { formatDate } from '%BASE%/util/dateUtil'
Edit: I have used webpack
as my module loader.