Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@nodejs/web-infra I'm fast-tracking this so we can release this |
There was a problem hiding this comment.
Pull request overview
Adds Vercel Analytics + Speed Insights instrumentation to the generated Doc Kit web layout so metrics appear in the Vercel dashboard.
Changes:
- Add
@vercel/analyticsand@vercel/speed-insightsdependencies. - Override Doc Kit’s
#theme/Layoutto inject<Analytics />and<SpeedInsights />site-wide. - Introduce a new custom
components/Layout/index.jsxcomposing the existing Navigation/Sidebar/Metabar components.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Adds Vercel analytics dependencies to runtime deps. |
| package-lock.json | Locks the newly added Vercel packages and their metadata. |
| doc-kit.config.mjs | Switches to a custom #theme/Layout implementation. |
| components/Layout/index.jsx | New layout component that injects Analytics/Speed Insights and composes existing UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import NavBar from '../Navigation'; | ||
| import MetaBar from '../Metabar'; | ||
| import SideBar from '../Sidebar'; |
There was a problem hiding this comment.
The relative imports ../Navigation, ../Metabar, and ../Sidebar rely on directory-style resolution. Native Node ESM does not support directory imports (it won’t resolve to index.jsx), which can break doc-kit generate if it loads this file via Node’s resolver. Prefer importing the explicit file paths (e.g., ../Navigation/index.jsx, etc.) to ensure resolution is reliable across tooling.
| import NavBar from '../Navigation'; | |
| import MetaBar from '../Metabar'; | |
| import SideBar from '../Sidebar'; | |
| import NavBar from '../Navigation/index.jsx'; | |
| import MetaBar from '../Metabar/index.jsx'; | |
| import SideBar from '../Sidebar/index.jsx'; |
Adds insights for our Vercel dashboard