Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

reportWebVitals.ts

13 lines359 Bytes

1const reportWebVitals = (onPerfEntry?: () => void) => {
2 if (onPerfEntry && onPerfEntry instanceof Function) {
3 import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
4 onCLS(onPerfEntry)
5 onINP(onPerfEntry)
6 onFCP(onPerfEntry)
7 onLCP(onPerfEntry)
8 onTTFB(onPerfEntry)
9 })
10 }
12​
13export default reportWebVitals