Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

uShip/babel-plugin-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 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'"

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%