babel-simple-replace-import-names

0.0.2 • Public • Published

babel-simple-replace-import-names

Simple Babel plugin to replace import names.

Install

npm install --save-dev babel-simple-replace-import-names

Usage

Add the following to the plugins section of Babel config:

[
  'babel-simple-replace-import-names',
  {
    libraries: {
      'react-native-gesture-handler': '/just/a/test/with/absolutePaths/rngh.js',
      'react-native-reanimated': '/just/a/test/with/absolutePaths/rna.js'
    }
  }
]

Then Babel will replace all the code importing from the provided module names to the given path...

/babel-simple-replace-import-names/

    Package Sidebar

    Install

    npm i babel-simple-replace-import-names

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    3.04 kB

    Total Files

    4

    Last publish

    Collaborators

    • jduarter