vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
55 stars 6 forks source link

Add postinstall script #3

Closed tobiaslins closed 10 months ago

tobiaslins commented 10 months ago

๐Ÿ““ What's in there?

Add a postinstall script that checks for analyticsId in next.config.js and VERCEL_ANALYTICS_ID in .env files

image

๐Ÿงช How to test?

Because we are in a monorepo you need to modify package.json from packages/web to

"postinstall": "node scripts/postinstall.js ../../apps/nextjs"

This is not needed when installed in node_modules without sym link.

Now set analyticsId or the environment variable, and run pnpm i and see if the log is shown

vercel[bot] commented 10 months ago

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
speed-insights-nextjs โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Sep 13, 2023 6:19am