babel-plugin-danger-remove-unused-imports
> Fork from `babel-plugin-danger-remove-unused-import` and `babel-plugin-remove-unused-imports`, Support remove unused `require`.
Last updated 2 years ago by shiftj .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install babel-plugin-danger-remove-unused-imports 
SYNC missed versions from official npm registry.

babel-plugin-danger-remove-unused-imports

Fork from babel-plugin-danger-remove-unused-import and babel-plugin-remove-unused-imports, Support remove unused require.

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

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

  • [x] Supporting Scope

Current Tags

  • 2.1.4                                ...           latest (2 years ago)

5 Versions

  • 2.1.4                                ...           2 years ago
  • 2.1.3                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 22
Today 0
This Week 0
This Month 10
Last Day 0
Last Week 0
Last Month 12
Dependencies (0)
None
Dev Dependencies (12)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE