A plugin for Babel v6 which replaces `__DEV__` with the result of evaluating `'production' !== process.env.NODE_ENV`.
npm install babel-plugin-transform-dev

Replaces all occurrences of __DEV__ in your JavaScript code with the result of evaluating "production" !== process.env.NODE_ENV.
In order to replace __ENV__ with just "production" !== process.env.NODE_ENV, set the plugin's evaluate option to false.
``sh`
$ npm install babel-plugin-transform-dev
.babelrc
`json`
{
"plugins": ["transform-dev"]
}
`sh`
$ babel --plugins transform-dev script.js
`javascript`
require("babel-core").transform("code", {
plugins: ["transform-dev"]
});
1. Fork it ( https://github.com/martinandert/babel-plugin-transform-dev )
2. Run npm install to install dependencies.npm test
3. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: .git checkout -b my-new-feature
4. Create your feature branch ()git commit -am 'add some feature'
5. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or are fixing a bug, we need a test!
6. Make the test pass.
7. Commit your changes ()git push origin my-new-feature`)
8. Push to your fork (
9. Create a new Pull Request
Released under The MIT License.