babel-plugin-react-autorequire
This plugin will autorequire all jsx components from global scope
Example
In
{ return <NewComponent />; }
Out
; { return <NewComponent />; }
Installation
$ npm install babel-plugin-react-autorequire
Options
es5 : true
- will use require
instead of import
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
$ babel --plugins react-autorequire script.js
Via Node API
;