gatsby-plugin-web-vitals icon indicating copy to clipboard operation
gatsby-plugin-web-vitals copied to clipboard

Depend on web-vitals 2.x

Open laradevitt opened this issue 3 years ago • 1 comments

This is a PR for Update web-vitals dependency to 2.x branch #5

With this update there is a breaking change as described in the PR Update CLS to max session window 5s cap 1s gap #148:

The only observable difference developers might notice to the API is previously the metric.entries array would only ever add new entries as additional shifts occurred on the page. With this change, only the entries from the max session window are reported, which means it could be the case the some of the entries referenced when CLS is first reported (e.g. after the tab is backgrounded), may not be the entries that are referenced the next time the tab is backgrounded. Developers not referencing the metric.entries array should not notice any differences other than a possible reduction in the value reported.

AFAICT this plugin only references the performance entry of the TTFB metric to calculate request time so I'm fairly confident this plugin would be unaffected by the breaking change but a proper review is obviously in order.

Thanks!

laradevitt avatar Nov 10 '21 18:11 laradevitt