#swc-plugin #statement #console #remove #console-log #helps

swc-plugin-remove-console

A swc plugin to remove console.log statements

2 unstable releases

0.3.0 Oct 8, 2024
0.2.0 Jun 24, 2024

#8 in #helps

Download history 137/week @ 2024-06-24 8/week @ 2024-07-01 6/week @ 2024-09-16 6/week @ 2024-09-23 16/week @ 2024-09-30 180/week @ 2024-10-07

208 downloads per month

MIT license

13KB
189 lines

swc plugin remove-console

A swc plugin helps you remove your console.* statement

Notice * now support:

  • log
  • warn
  • error
  • info

Configure

First ensure you've installed swc and swc-plugin-remove-console, then add following these codes in your .swcrc file

{
  "jsc": {
    "experimental": {
      "plugins": [
        [
          "swc-plugin-remove-console",
          {
            "exclude": ["error"] // this config is optional, default is [], you can pass `log`, `warn`, `error`, `info` to exclude some of them
          }
        ]
      ]
    }
  }
}

Dependencies

~5.5MB
~97K SLoC