npm.io
0.2.0 • Published 1 year ago

swc-plugin-ignore-import

Licence
MIT
Version
0.2.0
Deps
0
Size
1.2 MB
Vulns
0
Weekly
0
Stars
1

SWC plugin to ignore and remove certain imports based on configuration

Rust CI Code Smells codecov

Inspired by babel-plugin-ignore-import, and since I needed this functionality it was a blocker to moving fully utilizing SWC.

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

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

Code style

cargo fmt

Version history

Changes happening across different versions and upcoming changes are tracked in the CHANGELOG.md file.

License

Licensed under the MIT license.

Copyright (c) Juga Paazmaya paazmaya@yahoo.com

Keywords