Skip to content

jduarter/babel-simple-replace-import-names

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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...

About

Simple Babel plugin to replace import names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published