vercel/speed-insights

Required props for injectSpeedInsights

benoitrongeard opened this issue · 4 comments

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

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?

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.

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

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