babel-plugin-aliases
v1.0.1
Published
A babel plugin to transform aliases which also works with meteor. It also works with webpack and ava etc.
Downloads
10
Readme
babel-plugin-aliases
A babel plugin to transform aliases which also works with meteor. It also works with webpack and ava etc.
Installation
npm i --D babel-plugin-aliases
Usage
{
"plugins": [
["babel-plugin-aliases", [{
"path": "/some/deep/path",
"alias": "alias"
}]]
]
}
This will transform all import statements that have alias
at the beginning to a relative path.
Example
Imagine there is a file inside /some/path/file.js
import module from 'alias/file.js';
This will transform into
import module from '../deep/path/file.js';