# swc-plugin-ignore-import

> SWC plugin to ignore and remove certain imports based on configuration

Latest version **0.2.0** (published 2024-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install swc-plugin-ignore-import
pnpm add swc-plugin-ignore-import
yarn add swc-plugin-ignore-import
bun add swc-plugin-ignore-import
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2024-12-10 |
| First published | 2022-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Juga Paazmaya |
| Maintainers | paazmaya |
| Keywords | swc, plugin, swc-plugin, import |

## Links

- npm: https://www.npmjs.com/package/swc-plugin-ignore-import
- Repository: https://github.com/paazmaya/swc-plugin-ignore-import
- Issues: https://github.com/paazmaya/swc-plugin-ignore-import/issues
- npm.io page: https://npm.io/package/swc-plugin-ignore-import

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2024-12-10
- 0.1.0 — 2022-03-28

## README

# SWC plugin to ignore and remove certain imports based on configuration

[![Rust CI](https://github.com/paazmaya/swc-plugin-ignore-import/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/paazmaya/swc-plugin-ignore-import/actions/workflows/build-and-test.yml)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=paazmaya_swc-plugin-ignore-import&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=paazmaya_swc-plugin-ignore-import)
[![codecov](https://codecov.io/gh/paazmaya/swc-plugin-ignore-import/graph/badge.svg?token=T0lMtm9GSf)](https://codecov.io/gh/paazmaya/swc-plugin-ignore-import)

Inspired by [`babel-plugin-ignore-import`](https://www.npmjs.com/package/babel-plugin-ignore-import), and since I needed this functionality it was a blocker to moving fully utilizing [SWC](https://swc.rs/).

```js
import { transformSync } from "@swc/core";

const output = transformSync(input, {
  jsc: {
    experimental: {
      plugins: [
        [
          "swc-plugin-ignore-import",
          {
            pattern: ".scss$",
          }
        ]
      ],
    },
  },
});
```

## Code style

```sh
cargo fmt
```

## Version history

[Changes happening across different versions and upcoming changes are tracked in the `CHANGELOG.md` file.](CHANGELOG.md)

## License

Licensed under [the MIT license](LICENSE).

Copyright (c) [Juga Paazmaya](https://paazmaya.fi) <paazmaya@yahoo.com>

---
_Source: https://npm.io/package/swc-plugin-ignore-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
