babel-preset-transform-react-cells-import
v0.0.0
Published
A babel transform preset for transform the use of import ReactCells
Downloads
1
Readme
babel-plugin-transform-react-cells-import
Strip all flow type annotations and declarations from your output code.
Example
In
function foo(one: any, two: number, three?): string {}
Out
function foo(one, two, three) {}
Installation
mnpm install --save-dev babel-plugin-transform-react-cells-import
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": [["transform-react-cells-import", {"replaceModules": ["react-cells"]}]]
}
replaceModules: 数组,需要替换的包,默认值
[
'react-cells',
'@mtfe/react-cells',
'react-cells-mobile',
'@mtfe/react-cells-mobile'
]
Via CLI
babel --plugins transform-react-cells-import script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-react-cells-import"]
});