diff --git a/package-lock.json b/package-lock.json index 5775c46ee..a328430b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,6 @@ "vite": "^7.3.1", "vscode-jsonrpc": "^9.0.0", "vscode-languageserver-protocol": "^3.16.0", - "web-vitals": "^1.1.1", "xterm": "4.19.0", "xterm-addon-fit": "^0.5.0" }, @@ -13121,12 +13120,6 @@ "node": ">=18" } }, - "node_modules/web-vitals": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.2.tgz", - "integrity": "sha512-PFMKIY+bRSXlMxVAQ+m2aw9c/ioUYfDgrYot0YUa+/xa0sakubWhSDyxAKwzymvXVdF4CZI71g06W+mqhzu6ig==", - "license": "Apache-2.0" - }, "node_modules/webidl-conversions": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", diff --git a/package.json b/package.json index 224118a10..11808c14e 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "vite": "^7.3.1", "vscode-jsonrpc": "^9.0.0", "vscode-languageserver-protocol": "^3.16.0", - "web-vitals": "^1.1.1", "xterm": "4.19.0", "xterm-addon-fit": "^0.5.0" }, diff --git a/src/index.tsx b/src/index.tsx index 2d826c830..644d8b364 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -10,7 +10,6 @@ import "./layers.css"; import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import App from "./App"; -import reportWebVitals from "./reportWebVitals"; import { registerSW } from "virtual:pwa-register"; import { flags } from "./flags"; import { baseUrl } from "./base"; @@ -70,8 +69,3 @@ root.render( ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts deleted file mode 100644 index 5591aa395..000000000 --- a/src/reportWebVitals.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * (c) 2021, Micro:bit Educational Foundation and contributors - * - * SPDX-License-Identifier: MIT - */ -import { ReportHandler } from "web-vitals"; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - 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;