简体   繁体   中英

Reducing size of bundle.js

I have an react application and it's size is around 8mb, I want to reduce it's size. When I am using weback - p ie production version it is reduced to 4mb but then I am not able to debug it.

Is there any better way to do that.

You are supposed to have different builds for development and production. Production build is going to be minified, so it would be difficult to debug. To reduce the size of your bundle.js further you can try gzipping the file.

I've written an article on the same, Webpack:Get it together!

Hope it would be of some use. Cheers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM