Skip to content

feat(vercel): add analytics#17

Merged
ovflowd merged 1 commit intomainfrom
vercel-bundle-size
Apr 2, 2026
Merged

feat(vercel): add analytics#17
ovflowd merged 1 commit intomainfrom
vercel-bundle-size

Conversation

@avivkeller
Copy link
Copy Markdown
Member

Adds insights for our Vercel dashboard

Copilot AI review requested due to automatic review settings April 2, 2026 19:04
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-learn Ready Ready Preview Apr 2, 2026 7:04pm

Request Review

Copy link
Copy Markdown
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM!

@ovflowd ovflowd added this pull request to the merge queue Apr 2, 2026
@ovflowd
Copy link
Copy Markdown
Member

ovflowd commented Apr 2, 2026

@nodejs/web-infra I'm fast-tracking this so we can release this

Merged via the queue into main with commit a7352ee Apr 2, 2026
8 checks passed
@ovflowd ovflowd deleted the vercel-bundle-size branch April 2, 2026 19:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/analytics and @vercel/speed-insights dependencies.
  • Override Doc Kit’s #theme/Layout to inject <Analytics /> and <SpeedInsights /> site-wide.
  • Introduce a new custom components/Layout/index.jsx composing 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.

Comment on lines +6 to +8
import NavBar from '../Navigation';
import MetaBar from '../Metabar';
import SideBar from '../Sidebar';
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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';

Copilot uses AI. Check for mistakes.
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