babel-plugin-clear-unused-import
v1.0.3
Published
a babel plugin for clear unused import statement
Downloads
6
Maintainers
Readme
babel-plugin-clear-unused-import
Install
npm install --save babel-plugin-clear-unused-import
Usage
// Input
import _ from 'lodash';
import { funcA, funcB } from './util';
import * as CONSTANT from './constant';
export default function () {
funcA();
}
// Output
import { funcA } from './util';
export default function () {
funcA();
}
Options
{
// ignore some import modules?
ignore = ['react'] | 'react' | function (value) {
return value === 'react';
}: Array | String | Function,
}
Note
Plugins could be unsafe because some modules have side effects.