A Babel macro to convert relative paths to absolute paths
Usage
First, configure babel-plugin-macros
.
Then, use absolute-path.macro
as follows:
const absolutePath = console
The above code will compile into:
console
(Where /path/to/foo
is the absolute path to foo
.)
Installation
$ yarn add --dev absolute-path.macro