1.0.4 • Published 6 years ago

babel-plugin-aliases-meteor v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

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 import alias to 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';