0.8.2 • Published 6 years ago
babel-plugin-clean-type-exports v0.8.2
babel-plugin-clean-type-exports
清除类型导出的 Babel 插件。
例子
In
import A, { B, C } from './C';
export {
A,
/* type */
B,
// type
C,
};Out
import A, { B, C } from './C';
export { A };安装
yarn add babel-plugin-clean-type-exports使用
通过 .babelrc (推荐)
.babelrc
{
"plugins": ["babel-plugin-clean-type-exports"]
}通过命令行
babel --plugins babel-plugin-clean-type-exports script.js通过 Node API
require('@babel/core').transform('code', {
plugins: ['babel-plugin-clean-type-exports'],
});0.8.2
6 years ago