Open full view…

Bundle.js 925kb with Webpack ?

Wed, 10 Jan 2018 03:25:26 GMT

Hello there, For some reasons I have a large bloat of codes while trying to bundle swiper. It does work but my js bundle is 925kb (uncompressed, only swiper.js). I lack experience for now with webpack to know where do it come from I've added the following : exclude: /node_modules\/(?!(dom7|swiper)\/).*/, to my webpack.config.js import Swiper from 'swiper'; in my main .js babel preset is "browsers": ["last 2 versions", "safari >= 7"] and webpack version 3.10

Wed, 10 Jan 2018 12:42:03 GMT

Ok so I've rebuilding my settup I have a 259kb js bundle files, 171kb when uglified does it sound ok or maybe it's possible to do better?

Vladimir Kharlampidi
Fri, 12 Jan 2018 17:16:03 GMT

If there is only Swiper then probably a bit more than expected, the 4.0.7 is just about 110KB minified https://github.com/nolimits4web/Swiper/blob/master/dist/js/swiper.min.js

Fri, 12 Jan 2018 17:59:25 GMT

Sounds ok then, probably my Babel presets adding some extra thank you :)

Mon, 25 Jun 2018 13:40:23 GMT

Yea, 171kb is huge, take jQuery 82.34 KB react is 100.69 kB is there anything that can be done to seriously reduce the size?