/babel-plugin-import-helpers

Make helpers named imports instead of global member expression

Primary LanguageJavaScript

babel-plugin-import-helpers

Generate helpers that reference named imports from a module.

.babelrc

{
  "plugins": [
    ["import-helpers", { "module": "my-module/babel-helpers" }]
  ]
}

adds import

import { toArray } from "my-module/babel-helpers";