To back Alex up, 1P script costs are a daily issue we see. That's not to say 3P can't also tank perf, but we'd be lucky if that was the only problem. Challenge is whatever fw you pick, it's _too_ easy to install a spectrum of other libs that bloat your bundle. Need perf budgets.
-
-
Replying to @addyosmani @slightlylate and
Are people importing things badly, and pulling in all of lodash, d3, react-bootstrap, etc? Or are people really just installing a hot dozen un-needed js libraries. Some actual use cases would help a great deal here.
1 reply 0 retweets 2 likes -
Replying to @AdamRackis @slightlylate and
Things tanking experiences: 1. Shipping monolithic bundles w/o code-splitting 2. Including all of popular libraries vs. what you need (full UI libraries, lodash, d3, moment.js + locales etc). 3. Shipping unnecessary polyfills for target browsers 4. Duplicate (+oversized) libs
3 replies 9 retweets 46 likes -
Replying to @addyosmani @AdamRackis and
Isn't every single one of these things solvable with webpack?
2 replies 0 retweets 0 likes -
Replying to @mikeal @addyosmani and
The solution is always webpack for all problems including developer education.pic.twitter.com/ArINak0qOT
2 replies 0 retweets 1 like -
Replying to @brianleroux @addyosmani and
The solutions is probably something that *uses* webpack, like vue.js, that can do all a lot of complicated stuff like code splitting based on your routes without you having to do it manually.
2 replies 0 retweets 3 likes -
Replying to @mikeal @brianleroux and
And ... doing it manually is really just a matter of import("./module").then({ default: Module }) => rather than import Module from "./module" I reiterate that devs giving a shit would get them about 80% of the way there.
1 reply 0 retweets 1 like -
Replying to @AdamRackis @brianleroux and
You've gotta be writing each of these endpoints from scratch tho. The way a lot of these MVC routing libraries work is that it's just a bunch of components inside a base template, you're never writing the bundling import statement manually.
1 reply 0 retweets 0 likes -
Replying to @mikeal @brianleroux and
Ah sure - I meant that more for route-level splitting. Still, even component level splitting is turn-key thanks to react-loadable. I'm sure equivalent options are in Vue and company.
1 reply 0 retweets 1 like -
Replying to @AdamRackis @brianleroux and
Ya, I think people just literally aren't turning on this feature.
1 reply 0 retweets 0 likes
It's harder than that in prod, but the bug is that people are being sold kits, not cars. Of course they're unsafe in practice!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.