r/webdev • • Feb 13 '19

Bootstrap 5 will remove jQuery as a dependency

https://github.com/twbs/bootstrap/pull/23586
1.5k Upvotes

398 comments sorted by

View all comments

Show parent comments

16

u/gonzofish Feb 13 '19

Yes, the developer ergonomics is better but you end up shipping ALL of jquery to do it

15

u/andrerav full-stack Feb 13 '19

Just once usually, because caching. I assume CDN is still a thing too? How large is the base jquery library these days anyway?

7

u/gonzofish Feb 13 '19

The 3 alpha was minified at 83 KB, unminified is 250 KB. But the point is that you don’t need a library to do a lot of stuff anymore (thanks a lot to jQuery pushing us forward). You’re swapping 10 lines for 1 but also the other 83 KB of stuff you may not need.

10

u/KnightKreider Feb 13 '19

Their point is you're not grabbing anything new since the dependency is used so prevelently and almost certainly cached if you use a CDN.

I do agree that most modern browsers support the majority of what jquery is used for though.

7

u/electricity_is_life Feb 13 '19

I mean yeah but you don't have to look at the 83 KB of code. I'm really happy with all the stuff that's easy in vanilla JS now, but I don't really understand why people so badly want to get rid of jQuery. I don't use it for every project, but when it will be useful I don't see much reason to worry about the extra 30kb of (gzipped) data. Most of my images are bigger than that.

1

u/gonzofish Feb 13 '19

Very valid points!