1.0.9 • Published 6 years ago

babel-plugin-meteoralias v1.0.9

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

babel-plugin-meteoralias

A Babel 7 plugin to transform aliases which works with Meteor.

Installation

npm i --D babel-plugin-meteoralias

Usage

{
  "plugins": [
    ["babel-plugin-meteoralias", {
        "aliases": [
            {
                "from": "react",
                "to": "preact-compat"
            },
            {
                "from": "react-dom",
                "to": "preact-compat"
            }
        ]
    }]
  ]
}

This will transform all import statements that import alias to path.

Example

import React from 'react';
import { render } from 'react-dom';

This will transform into

import React from 'preact-compat';
import { render } from 'preact-compat';
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago