Skip to content

refine: remove no-op reportWebVitals from playground - #6233

Merged
max-sixty merged 1 commit into
mainfrom
refine/playground-drop-web-vitals
Aug 26, 2026
Merged

refine: remove no-op reportWebVitals from playground#6233
max-sixty merged 1 commit into
mainfrom
refine/playground-drop-web-vitals

Conversation

@prql-bot

Copy link
Copy Markdown
Collaborator

Found during the nightly survey of web/playground/src/.

reportWebVitals() is called with no argument in main.jsx, and its body is guarded on if (onPerfEntry && onPerfEntry instanceof Function) — so the guard is always false and the dynamic import("web-vitals") inside it never runs. The module is Create React App boilerplate (note the stale bit.ly/CRA-vitals link) that outlived the migration to Vite. This removes the module, its single call site, and the web-vitals dependency, which nothing else in the repo reaches.

The dependency is worth removing rather than leaving inert: Dependabot watches /web/playground for npm, so web-vitals generates PRs that a maintainer reviews and merges for code that cannot execute.

Verification
  • web-vitals is referenced nowhere else — repo-wide grep over *.js, *.jsx, *.json, *.yaml, *.md (excluding node_modules) returns only reportWebVitals.js, the main.jsx import/call, and the package.json entry, all of which this PR removes.
  • package-lock.json was edited surgically rather than regenerated: the runner's npm (10.9.8) is older than the one that wrote the lockfile and strips libc metadata from ~10 optional-dependency entries, which would be unrelated churn. The edit was cross-checked by running npm install --package-lock-only --ignore-scripts on a copy and diffing the resulting packages key set against the hand-edited file — the sets are identical, so the removal matches npm's own resolution.
  • prettier --check passes on CHANGELOG.md, main.jsx, and package.json. Prettier fully parses the JSX, so the edited main.jsx is syntactically valid.

No regression test: the change deletes code that provably never executed, so there is no behavior to pin. The playground build in CI is the check that the removed import broke nothing.

`reportWebVitals()` is called with no argument, and its body is guarded on that argument being a function, so the dynamic `import("web-vitals")` inside it never ran. Remove the module, its call site, and the `web-vitals` dependency it was the sole reachable importer of.
@max-sixty
max-sixty merged commit d63e957 into main Aug 26, 2026
37 checks passed
@max-sixty
max-sixty deleted the refine/playground-drop-web-vitals branch August 26, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants