$ cnpm install babel-plugin-transform-global-defs
Transform Global definitions that are available at build time
npm install babel-plugin-transform-global-defs
{
"global_defs": {
"process.env": {
"NODE_ENV": "production"
}
}
}
In
if (process.env.NODE_ENV !== 'production') {
DEBUG = true;
}
Out
if ('production' !== 'production') {
DEBUG = true;
}
Copyright 2013 - present © cnpmjs.org | Home |