babel-plugin-transform-react-remove-prop-types
babel-plugin-transform-react-remove-prop-types copied to clipboard
How to use it with multiple environments in babel-env?
My .babelrc has 2 environments that are used for differential serving:
"env": {
"modern": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
],
"@babel/preset-react",
"@babel/preset-flow"
],
"plugins": [...],
},
"legacy": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": false
}
}
],
"@babel/preset-react",
"@babel/preset-flow"
],
"plugins": [...],
}
}
These can be selected using the BABEL_ENV flag. Since either modern or legacy is selected I can't just add another environment (production) because two environments cannot be selected at the same time.