Post

We've just published v5.0.0 of the web-vitals JavaScript library for measuring Core Web Vitals. github.com/GoogleChrome... As a major release, this includes a number of breaking changes as detailed in the upgrading doc: github.com/GoogleChrome... Please read carefully before upgrading. 1/5 🧵

github.comGitHub - GoogleChrome/web-vitals: Essential metrics for a healthy site.Essential metrics for a healthy site. Contribute to GoogleChrome/web-vitals development by creating an account on GitHub.

12 reposts47 likes

We've moved to Baseline browser support, allowing us to use more modern JavaScript and reduce bundle sizes. Older browser will not be able to monitor Core Web Vitals metrics anyway, but ensure you load the library correctly (e.g. in script type=module) to prevent issues on really old browsers. 2/5

We added bucketing as a different way of breaking down INP (on top of the INP subparts) to help you identify where you're spending your time (script or style and layout?), similar to how DevTools buckets times in a performance trace. 3/5

We've added the ability for you to specify your own code for generating custom targets, if you don't like the CSS selectors the library generates by default or have custom attributes that are more meaningful to you. 4/5