Question
We are developing a service using React Router v7 and deploying it on Vercel.
Currently, it seems that Vercel Speed Insights only supports Next.js, React, and Remix, and not React Router v7.
How can we properly use Speed Insights with React Router v7?
Current vs Expected Behavior
@vercel/speed-insights/next
and@vercel/speed-insights/remix
:
Causes build errors and cannot be used.
@vercel/speed-insights/react
:
No build errors, but appears to lack SSR (Server-Side Rendering) support.
We expected a working integration for React Router v7, especially for applications using SSR.
Reproduction Steps
- Set up a React project with React Router v7
- Deploy to Vercel
- Try integrating each of the following:
@vercel/speed-insights/next
@vercel/speed-insights/remix
@vercel/speed-insights/react
- Observe the results:
- Next/Remix versions throw build errors
- React version builds, but lacks SSR compatibility
Project Information
- Framework: React 19 + React Router v7
- Deployment: Vercel
- Speed Insights packages tested:
@vercel/speed-insights/react
@vercel/speed-insights/next
@vercel/speed-insights/remix
Please let us know the recommended approach or any workaround for using Speed Insights with React Router v7.
Thank you!