asb_cloud_front/src/reportWebVitals.ts

13 lines
323 B
TypeScript

import { getCLS, getFID, getFCP, getLCP, getTTFB, ReportHandler } from 'web-vitals'
export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (!onPerfEntry) return
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
}
export default reportWebVitals