Open andriytyurnikov opened 10 months ago
I see this as well. I'm on sveltekit2.0 if that matters.
Interesting the README says to put the initialization in your +layout.svelte file but the example has it in +layout.ts
layout.svelte is correct, since it needs to be in the markup. I just wrapped in a dev check to disable it in development.
Hello and thank you for the bug report.
I've fixed the README: the best way to use injectSpeedInsights()
function is in the +layout.ts/js
file (which will be run on server side), as per our docs
However, I'm not seeing any error in console.
Could you please provide the version of @vercel/speed-insights
and sveltekit that you're using?
Thanks a million.