diff options
author | 2021-09-05 15:34:35 -0700 | |
---|---|---|
committer | 2021-09-05 15:34:35 -0700 | |
commit | ac123f23719e3212ec1a6a16e0b1f915d1c175b4 (patch) | |
tree | 69cae12d7f4bb60f390d331adcfccbf2b52cd2c6 /examples/hello-create-react-app/src/reportWebVitals.js | |
parent | 48dadc17f69a5be905ebe28e811a9ad8dfc82714 (diff) | |
download | bun-ac123f23719e3212ec1a6a16e0b1f915d1c175b4.tar.gz bun-ac123f23719e3212ec1a6a16e0b1f915d1c175b4.tar.zst bun-ac123f23719e3212ec1a6a16e0b1f915d1c175b4.zip |
create-react-app
Former-commit-id: 33647ef65cbac1c89c16a8b81dfa7de0fad5af3e
Diffstat (limited to 'examples/hello-create-react-app/src/reportWebVitals.js')
-rw-r--r-- | examples/hello-create-react-app/src/reportWebVitals.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/hello-create-react-app/src/reportWebVitals.js b/examples/hello-create-react-app/src/reportWebVitals.js new file mode 100644 index 000000000..5253d3ad9 --- /dev/null +++ b/examples/hello-create-react-app/src/reportWebVitals.js @@ -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; |