Added service worker config from CRA4.

This commit is contained in:
Patrick Fic
2021-03-26 12:44:42 -07:00
parent 89d4eb28b6
commit 6c47918542
7 changed files with 14244 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
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;