vercel / speed-insights

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

Required props for injectSpeedInsights #32

Closed benoitrongeard closed 5 months ago

benoitrongeard commented 7 months ago

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 commented 6 months ago

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 commented 5 months ago

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 commented 5 months ago

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

benoitrongeard commented 5 months ago

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