2.1.4 • Published 8 months ago

babel-plugin-danger-remove-unused-imports v2.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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

  • Supporting Scope
2.1.4

8 months ago

2.1.3

8 months ago

2.1.2

9 months ago

2.1.1

9 months ago

2.1.0

9 months ago