In a testing or development environment, it is common that we try to use different presets or plugins to interpret and compile our code base.
For example, while in development environment we want to keep all the console logs for debugging purposes, it is better to remove console.log in the production environment;
Here we can config Babelrc setting and the plugins depend on the value of NODE_ENV.
And we can now selectively apply different plugins in the production and development environment
Leave a Reply