babel-plugin-clean-type-import-export
TypeScript icon, indicating that this package has built-in type declarations

0.12.1 • Public • Published

babel-plugin-clean-type-import-export

清除类型导入和导出的 Babel 插件。

例子

In

import A, { B, C, D, E } from './C';

export {
  A,
  /* type */
  B,
  // type
  C,
};

Out

import A, { D, E } from './C';

export { A };

安装

yarn add babel-plugin-clean-type-import-export

使用

通过 .babelrc (推荐)

.babelrc

{
  "plugins": ["babel-plugin-clean-type-import-export"]
}

通过命令行

babel --plugins babel-plugin-clean-type-import-export script.js

通过 Node API

require('@babel/core').transform('code', {
  plugins: ['babel-plugin-clean-type-import-export'],
});

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-clean-type-import-export

Weekly Downloads

0

Version

0.12.1

License

MIT

Unpacked Size

14.2 kB

Total Files

9

Last publish

Collaborators

  • jackingliu