swc-plugin-remove-console

Crates.ioswc-plugin-remove-console
lib.rsswc-plugin-remove-console
version0.3.0
sourcesrc
created_at2024-06-24 07:14:10.480018
updated_at2024-10-08 05:55:54.988887
descriptionA swc plugin to remove console.log statements
homepage
repositoryhttps://github.com/alexzhang1030/swc-plugin-remove-console.git
max_upload_size
id1281943
size30,152
Alex (alexzhang1030)

documentation

README

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
          }
        ]
      ]
    }
  }
}

Commit count: 126

cargo fmt