react-docker-optimization/src/reportWebVitals.js
hadestructhor 0fd3efe332
All checks were successful
ci/woodpecker/manual/workflow Pipeline was successful
ci/woodpecker/tag/workflow Pipeline was successful
feat: Simple Dockerfile version
2025-01-04 14:29:35 +01:00

13 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;