Skip to content

Use Babel to replace "__DEV__" keyword with "process.env.NODE_ENV !== 'production'"

License

Notifications You must be signed in to change notification settings

Zenwolf/babel-plugin-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-dev

Replaces __DEV__ with process.env.NODE_ENV !== 'production'.

Installation

$ npm install babel-plugin-dev

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["dev"]
}

Via CLI

$ babel --plugins dev script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["dev"]
});

Running the tests

$ git clone https://github.com/Zenwolf/babel-plugin-dev.git
$ cd babel-plugin-dev
$ npm install
$ npm test

About

Use Babel to replace "__DEV__" keyword with "process.env.NODE_ENV !== 'production'"

Resources

License

Stars

Watchers

Forks

Packages

No packages published