Skip to content

Commit

Permalink
Fix Create React App build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
watsonbox committed Aug 29, 2024
1 parent 102dd4d commit 678b1c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@
"msw": "^0.49.1",
"react-test-renderer": "^18.3.1",
"sass": "^1.77.8"
},
"resolutions": {
"**/fork-ts-checker-webpack-plugin": "^6.5.3"
}
}
18 changes: 9 additions & 9 deletions src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { ReportHandler } from 'web-vitals';
import { ReportCallback } from "web-vitals";

const reportWebVitals = (onPerfEntry?: ReportHandler) => {
const reportWebVitals = (onPerfEntry?: ReportCallback) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
import("web-vitals").then(({ onCLS, onINP, onFCP, onLCP, onTTFB }) => {
onCLS(onPerfEntry);
onINP(onPerfEntry);
onFCP(onPerfEntry);
onLCP(onPerfEntry);
onTTFB(onPerfEntry);
});
}
}
};

export default reportWebVitals;
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5404,10 +5404,10 @@ for-each@^0.3.3:
dependencies:
is-callable "^1.1.3"

fork-ts-checker-webpack-plugin@^6.5.0:
version "6.5.2"
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz#4f67183f2f9eb8ba7df7177ce3cf3e75cdafb340"
integrity sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA==
fork-ts-checker-webpack-plugin@^6.5.0, fork-ts-checker-webpack-plugin@^6.5.3:
version "6.5.3"
resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.3.tgz#eda2eff6e22476a2688d10661688c47f611b37f3"
integrity sha512-SbH/l9ikmMWycd5puHJKTkZJKddF4iRLyW3DeZ08HTI7NGyLS38MXd/KGgeWumQO7YNQbW2u/NtPT2YowbPaGQ==
dependencies:
"@babel/code-frame" "^7.8.3"
"@types/json-schema" "^7.0.5"
Expand Down

0 comments on commit 678b1c7

Please sign in to comment.