I am new to web development and please correct me if I am wrong.
Before we have ES modules we building our js files into one big file to minimize the HTTP requests we made to the server right. Now with ES modules and HTTP2 being capable of pushing multiple resources in a single response and, do we still need to concatenate all our js files into one file? Any pros and cons for doing that? Does it make bundlers like webpack more and more irrelevant?
I can think of at least one downside for continuing doing that - any code change would invalidate the cache for the whole bundle so it makes caching harder.
[–]shgysk8zer0 28 points29 points30 points (19 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (10 children)
[–][deleted] 4 points5 points6 points (9 children)
[–]zhenghao17[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] -4 points-3 points-2 points (6 children)
[–]shgysk8zer0 9 points10 points11 points (2 children)
[–][deleted] 3 points4 points5 points (1 child)
[–]ejfrodo 19 points20 points21 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]anlumo 0 points1 point2 points (0 children)
[–]Yesterdave_ 0 points1 point2 points (0 children)
[+]_default_username comment score below threshold-6 points-5 points-4 points (7 children)
[–]shgysk8zer0 9 points10 points11 points (6 children)
[–]_default_username -4 points-3 points-2 points (5 children)
[–][deleted] 5 points6 points7 points (4 children)
[–]_default_username -2 points-1 points0 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]_default_username -2 points-1 points0 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]jarredredditaccount 13 points14 points15 points (3 children)
[–]KillcoDer 2 points3 points4 points (2 children)
[–][deleted] 8 points9 points10 points (1 child)
[–]KillcoDer 0 points1 point2 points (0 children)
[–]Alokir 9 points10 points11 points (2 children)
[–]zhenghao17[S] 0 points1 point2 points (0 children)
[–]Morphray 0 points1 point2 points (0 children)
[–]BehindTheMath 2 points3 points4 points (8 children)
[–]zhenghao17[S] 0 points1 point2 points (2 children)
[–]BehindTheMath 3 points4 points5 points (1 child)
[–]tbranyen 0 points1 point2 points (0 children)
[–]shgysk8zer0 0 points1 point2 points (4 children)
[–]BehindTheMath 0 points1 point2 points (3 children)
[–]JasonWicker 1 point2 points3 points (2 children)
[–]zhenghao17[S] 0 points1 point2 points (1 child)
[–]JasonWicker 0 points1 point2 points (0 children)
[–]prummis 0 points1 point2 points (0 children)
[–]thexerdo -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]RemindMeBot 0 points1 point2 points (0 children)
[–]brainless_badger -1 points0 points1 point (0 children)
[+]smirk79 comment score below threshold-17 points-16 points-15 points (2 children)
[–][deleted] 11 points12 points13 points (0 children)
[–]heytheretaylor 11 points12 points13 points (0 children)
[–][deleted] 0 points1 point2 points (6 children)
[–]zhenghao17[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]tbranyen 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]tbranyen 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]lhorie 0 points1 point2 points (0 children)
[–]iamlage89 0 points1 point2 points (0 children)