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

Required props for injectSpeedInsights #32

Closed
benoitrongeard opened this issue Dec 11, 2023 · 4 comments · Fixed by #38
Closed

Required props for injectSpeedInsights #32

benoitrongeard opened this issue Dec 11, 2023 · 4 comments · Fixed by #38
Labels
enhancement New feature or request

Comments

@benoitrongeard
Copy link

benoitrongeard commented Dec 11, 2023

Hey,

Wanted to enable vercel speed insights with an Angular app.

I'm using Typescript@5.2.2 with Angular@17, vercel/speed-insights@1.0.1

The injectSpeedInsights function require a props argument.
To work well, and see vercel speed insight result and http calls in console, i set a empty object {} as props argument.

Without this argument, vercel speed insights don't work (Can't see http calls for insight inside network tab)

Capture d’écran 2023-12-11 à 23 24 25 Capture d’écran 2023-12-11 à 23 24 34
@KingPr0o7
Copy link

Also had to do something like this, not sure what's the big deal. Now may I ask, @benoitrongeard do you receive any VERCEL_ANALYTICS_ID not found errors in your console?

@feugy
Copy link
Member

feugy commented Jan 12, 2024

Hello and thank you for the bug report.
The function needs an argument indeed, because it may need to know the framework. The team is currently checking if we could make it optional or not.
More to come soon.

@feugy
Copy link
Member

feugy commented Jan 12, 2024

@benoitrongeard version 1.0.3 contains a fix and will be available within a few minutes.

@benoitrongeard
Copy link
Author

@feugy Thx
I already test the new version 1.0.3 and everything is ok, no error with TS when don't pass argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants