0.0.1 • Published 2 years ago

@liutsing/babel-plugin-remove-console v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

@liutsing/babel-plugin-remove-console

function

remove the console code of source code, and support option to exclude some sub property for production debug, for example: console.debug, console.warn

usge

in babel config file like .babelrc,

{
  "plugins": [
    [
      "@liutsing/babel-plugin-remove-console",
      {
        "exclude": ["debug", "error", "warn"]
      }
    ]
  ]
}

more

Plugin Ordering

Ordering matters for each visitor in the plugin.

This means if two transforms both visit the "Program" node, the transforms will run in either plugin or preset order.

  • Plugins run before Presets.
  • Plugin ordering is first to last.
  • Preset ordering is reversed (last to first).