Closed qfz closed 9 years ago
react
has a lot for debug code which is garded with if(process.env.NODE_ENV !== "production")
. The DefnePlugin
+ uglify removes this code in the production build.
Thanks a lot, I thought if(process.env.NODE_ENV !== "production") was for nodejs server. It all makes sense now.
I found that "npm run build" produces very small js file comparing to just using uglify. Just wondering what you did to achieve such high level of compression? I tried to look at make-webpack-config.js, but couldn't find anything special there. Thanks.