Babel plugin that replaces the "__DEV__" keyword with "process.env.NODE_ENV !== 'production'" for dev- and debug-specific code.
npm install babel-plugin-devReplaces __DEV__ with process.env.NODE_ENV !== 'production'.
``sh`
$ npm install babel-plugin-dev
.babelrc
`json`
{
"plugins": ["dev"]
}
`sh`
$ babel --plugins dev script.js
`javascript`
require("babel-core").transform("code", {
plugins: ["dev"]
});
`sh``
$ git clone https://github.com/Zenwolf/babel-plugin-dev.git
$ cd babel-plugin-dev
$ npm install
$ npm test