eg:
ifisProd{
//do something for prods
}else{
//do something for others
}
webpack
//do something for prods
There is a corresponding plug-in in gulp, which is via regular matching Filter. No corresponding plug-ins have been found in webpack for the time being! Do you have any recommendations. Thank you!
I know how to judge the environment. The key thing is to remove the code snippets from the non-production environment (when packaging) and reduce the amount of code deployed! So that there is only production-related code in the production environment, and there is no judgment logic code in other environments!