babel-plugin-transform-global-defs

Transform global definitions that are available at build time

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-transform-global-defs
0.1.16 years ago6 years agoMinified + gzip package size for babel-plugin-transform-global-defs in KB

Readme

babel-plugin-transform-global-defs
Transform Global definitions that are available at build time

Install

npm install babel-plugin-transform-global-defs

Options

{
  "global_defs": {
    "process.env": {
      "NODE_ENV": "production"
    }
  }
}

In
if (process.env.NODE_ENV !== 'production') {
  DEBUG = true;
}

Out
if ('production' !== 'production') {
  DEBUG = true;
}