babel-plugin-danger-remove-unused-import
v2.0.0
Published
[![Build status](https://img.shields.io/travis/imcuttle/babel-plugin-danger-remove-unused-import/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/babel-plugin-danger-remove-unused-import) [![Test coverage](https://img.shields.io/codecov/c/git
Downloads
3,444
Maintainers
Readme
babel-plugin-danger-remove-unused-import
For shrinking the bundled javascript size :smile:
Note: remove unused import is dangerous
because the imported package may have some side effects!
Option
{
ignore: ['react']
}
Input
import React from 'react'
import Button from 'button'
import _ from 'lodash'
import moment from 'moment'
import { data } from '../some-where'
// ...
const a = {}
a.moment = <Button x={data} />
Output
import React from 'react'
import Button from 'button'
- import _ from 'lodash'
- import moment from 'moment'
import {data} from '../some-where'
// ...
const a = {}
a.moment = <Button x={data} />
Todo
- [ ] Supporting Scope