Skip to content

Commit fa7c660

Browse files
committed
fix: replace deprecated onFID with onINP
1 parent e9c093d commit fa7c660

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

templates/base/src/reportWebVitals.ts.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
const reportWebVitals = (onPerfEntry?: () => void) => {
33
if (onPerfEntry && onPerfEntry instanceof Function) {
44
import("web-vitals").then(
5-
({ onCLS, onFID, onFCP, onLCP, onTTFB }: any) => {
5+
({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
66
onCLS(onPerfEntry);
7-
onFID(onPerfEntry);
7+
onINP(onPerfEntry);
88
onFCP(onPerfEntry);
99
onLCP(onPerfEntry);
1010
onTTFB(onPerfEntry);
@@ -15,9 +15,9 @@ const reportWebVitals = (onPerfEntry?: () => void) => {
1515
<% } else { %>
1616
const reportWebVitals = onPerfEntry => {
1717
if (onPerfEntry && onPerfEntry instanceof Function) {
18-
import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => {
18+
import('web-vitals').then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
1919
onCLS(onPerfEntry);
20-
onFID(onPerfEntry);
20+
onINP(onPerfEntry);
2121
onFCP(onPerfEntry);
2222
onLCP(onPerfEntry);
2323
onTTFB(onPerfEntry);

0 commit comments

Comments
 (0)