Files
msw-open-music/web/src/reportWebVitals.js
heimoshuiyu e170c8b842 Rewrite web front-end using React
This is a big commit, some font-end function are still working,
including manage, error handle, as others.
2021-11-21 17:30:43 +08:00

14 lines
362 B
JavaScript

const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;