What happened with shipping everything in a single file and letting cache magic happen?
CSS and JS code coverage in Chrome DevTools
11–20 of 130 posts
Re: CSS and JS code coverage in Chrome DevTools
#12Re: CSS and JS code coverage in Chrome DevTools
#13Can this be useful when someone uses webpack?
Re: CSS and JS code coverage in Chrome DevTools
#14But this now sounds like a coverage tool for a single page?
Does anyone know if it can record over multiple pages and/or application usage (such as an SPA)?
Re: CSS and JS code coverage in Chrome DevTools
#15Earlier quoted context omitted.
Not that I don't appreciate the efforts that they put in to helping developers--and I'm sure this is for the single-page PWA crowd--but CSS and JS is far more complicated than looking at a single page (especially for big organisations).
If it's not for this page, then why are you loading it? Load it when the user goes to that other page. That's the idea behind bundle splitting and whatnot. Don't send users code they don't need yet. Most of them are never going to get to the part of the page that does need that code.
Re: CSS and JS code coverage in Chrome DevTools
#16Re: CSS and JS code coverage in Chrome DevTools
#17Re: CSS and JS code coverage in Chrome DevTools
#18What happened with shipping everything in a single file and letting cache magic happen?
Caching one big file has the draw back of busting the cache each time the file is updated for any small change.
Caching multiple small files allows you to have a finer grain cache. Only bust the things that updated. And, since it's all the same TCP connection it's now performant to load this way.
Re: CSS and JS code coverage in Chrome DevTools
#19Re: CSS and JS code coverage in Chrome DevTools
#20Can this be useful when someone uses webpack?
Why would it be any different if they weren't? Unused code is unused code.
Plus in my current environment (ReactJS + TypeScript + MobX + Webpack) tslint generates errors when I have unused variables and that breaks TeamCity build.
No matter what, this tool is super useful!