babel-plugin-import-rename
Rename import sources with a RegExp like a boss.
Example
Maybe you want to remove .jsx
extension from compiled files:
input.js
.babelrc
output.js
'use strict';var _Foo = ;var _Foo2 = ; { return obj && obj__esModule ? obj : default: obj ; }
Usage
Specify sources and replacements as plugin options. Option keys are strings passed directly to the RegExp constructor for matching against import sources in your code. Option values are the replacements.
Via .babelrc (recommended)
Via Node API