1.0.0 • Published 7 years ago
@iaziz786/babel-plugin-transform-dev-prod-expression v1.0.0
babel-plugin-transform-dev-prod-expression
A babel plugin to transform __DEV__ and __PROD__ expressions.
What magic it does?
It can convert this:
if (__DEV__) {
// some script to run in development mode
}
if (__PROD__) {
// some script to run in development mode
}Into this:
if (process.env.NODE_ENV === 'development') {
// some script to run in production mode
}
if (process.env.NODE_ENV === 'production') {
// some script to run in production mode
}1.0.0
7 years ago