babel-plugin-module-provider

1.1.0 • Public • Published

Module Provider

This plugin simply adds imports to the top of all of your files so you can spend more time writing the code that matters.

Examples

Default imports:

.babelrc :

{
  "presets": ["es2015"],
  "plugins": [
    ["modules-provider", {
      "@cycle/core": "Cycle",
      "@cycle/dom": "CycleDOM"
    }]
  ]
}

This configuration will put this at the top of your files

import Cycle from "@cycle/core";
import CycleDOM from "@cycle/core";

Non-default imports:

.babelrc :

{
  "presets": ["es2015"],
  "plugins": [
    ["modules-provider", {
      "@cycle/dom": ["div", "h2", "h4"]
    }]
  ]
}

This configuration will place this at the top of your files

import {div, h2, h4} from "@cycle/dom"

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i babel-plugin-module-provider

    Weekly Downloads

    2

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • tylors