移除 web-vitals

This commit is contained in:
xxx 2024-02-20 15:01:33 +08:00
parent 7c0decf82a
commit 6ccf595984
3 changed files with 0 additions and 22 deletions

View File

@ -25,7 +25,6 @@
"react-router-dom": "^6.9.0",
"redux": "^4.2.1",
"sort-by": "^1.2.0",
"web-vitals": "^3.3.0",
"xlsx": "^0.18.5"
},
"devDependencies": {

View File

@ -2,7 +2,6 @@ import ReactDOM from "react-dom/client";
import "./assets/iconfont/iconfont.css";
import "./index.less";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import { BrowserRouter } from "react-router-dom";
import { Provider } from "react-redux";
import store from "./store";
@ -25,8 +24,3 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
</ConfigProvider>
</Provider>
);
// 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();

View File

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