Open History to see the last commit
1<% if (addOnEnabled.start) { ignoreFile() } %><% if (typescript) { %>
2const reportWebVitals = (onPerfEntry?: () => void) => {
3 if (onPerfEntry && onPerfEntry instanceof Function) {
4 import("web-vitals").then(
5 ({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
6 onCLS(onPerfEntry);
7 onINP(onPerfEntry);
8 onFCP(onPerfEntry);
9 onLCP(onPerfEntry);
10 onTTFB(onPerfEntry);
11 }
12 );
13 }
14};
15<% } else { %>
16const reportWebVitals = onPerfEntry => {
17 if (onPerfEntry && onPerfEntry instanceof Function) {
18 import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
19 onCLS(onPerfEntry);
20 onINP(onPerfEntry);
21 onFCP(onPerfEntry);
22 onLCP(onPerfEntry);
23 onTTFB(onPerfEntry);
24 });
25 }
26};
27<% } %>
28export default reportWebVitals;