I'm trying to optimize my website. I would like to create the thinnest build possible.
I have a .env file containing
REACT_APP_ENV = DEV
Here is an exemple of what I want to reduce :
if (REACT_APP_ENV === "DEV) {
// DO SOMETHING A
} else {
// DO SOMETHING B
}
I would like to reduce it to :
// DO SOMETHING A
Is there a way to create a reduced build like this ?
We already know that REACT_APP_ENV === DEV when building, so it seems possible to me that we can simplify this code.
Currently, I am using webpack with babel to build.
If you have any clues, I'd appreciate to see them.
Thank you for reading