Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postinstall script #3

Merged

Conversation

tobiaslins
Copy link
Collaborator

📓 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

@tobiaslins tobiaslins requested a review from a team September 12, 2023 13:24
@vercel
Copy link

vercel bot commented Sep 12, 2023

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

Copy link
Member

@feugy feugy left a comment

Choose a reason for hiding this comment

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

Minor suggestions.
Looks pretty straightforward otherwise!

praise: Thanks you so much for the testing instructions!! Worked like a charm.

@tobiaslins tobiaslins merged commit 67d7c14 into main Sep 13, 2023
@tobiaslins tobiaslins deleted the tobiaslins/aly-925-implement-postinstall-script-for-package branch September 13, 2023 11:53
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