Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-dev-warning

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-dev-warning

Remove development warning from production code

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
decreased by-4.85%
Maintainers
1
Weekly downloads
 
Created
Source

Babel Plugin for removing warning call

Build Status npm version npm downloads

This plugin removes development warning from production code. It's recommended to be used with https://github.com/r3dm/warning.

Example

In

warning(condition, argument, argument);

Out

if (process.env.NODE_ENV !== 'production') {
  warning(condition, argument, argument);
}

Installation

$ npm install --save-dev babel-plugin-transform-dev-warning

Usage

.babelrc

{
  "env": {
    "production": {
      "plugins": ["transform-dev-warning"]
    }
  }
}
Via CLI
$ babel --plugins transform-dev-warning script.js
Via Node API
require("babel-core").transform("code", {
  plugins: ["transform-dev-warning"]
});

License

MIT

Keywords

FAQs

Package last updated on 21 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc