Skip to content

Remove web-vitals #12540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions docusaurus/docs/measuring-performance.md

This file was deleted.

1 change: 0 additions & 1 deletion docusaurus/website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"adding-a-router",
"adding-custom-environment-variables",
"making-a-progressive-web-app",
"measuring-performance",
"production-build"
],
"Testing": ["running-tests", "debugging-tests"],
Expand Down
65 changes: 14 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
"strip-ansi": "^6.0.1",
"svg-term-cli": "^2.1.1",
"tempy": "^1.0.1",
"wait-for-localhost": "^3.3.0",
"web-vitals": "^2.1.2"
"wait-for-localhost": "^3.3.0"
},
"husky": {
"hooks": {
Expand Down
3 changes: 1 addition & 2 deletions packages/cra-template-typescript/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"@types/node": "^16.7.13",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"typescript": "^4.4.2",
"web-vitals": "^2.1.0"
"typescript": "^4.4.2"
},
"eslintConfig": {
"extends": ["react-app", "react-app/jest"]
Expand Down
6 changes: 0 additions & 6 deletions packages/cra-template-typescript/template/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
Expand All @@ -12,8 +11,3 @@ root.render(
<App />
</React.StrictMode>
);

// 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();
15 changes: 0 additions & 15 deletions packages/cra-template-typescript/template/src/reportWebVitals.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/cra-template/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"web-vitals": "^2.1.0"
"@testing-library/user-event": "^13.2.1"
},
"eslintConfig": {
"extends": ["react-app", "react-app/jest"]
Expand Down
6 changes: 0 additions & 6 deletions packages/cra-template/template/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);

// 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();
13 changes: 0 additions & 13 deletions packages/cra-template/template/src/reportWebVitals.js

This file was deleted.

4 changes: 2 additions & 2 deletions tasks/e2e-installs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function exists {
# Check for accidental dependencies in package.json
function checkDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(react(-dom|-scripts)?)"'; then
grep -v -q -E '^\s*"(@testing-library\/.+)|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
Expand All @@ -62,7 +62,7 @@ function checkDependencies {
# Check for accidental dependencies in package.json
function checkTypeScriptDependencies {
if ! awk '/"dependencies": {/{y=1;next}/},/{y=0; next}y' package.json | \
grep -v -q -E '^\s*"(@testing-library\/.+)|web-vitals|(@types\/.+)|typescript|(react(-dom|-scripts)?)"'; then
grep -v -q -E '^\s*"(@testing-library\/.+)|(@types\/.+)|typescript|(react(-dom|-scripts)?)"'; then
echo "Dependencies are correct"
else
echo "There are extraneous dependencies in package.json"
Expand Down