vercel / speed-insights

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

Astro import using wrong types #62

Open nblackburn opened 8 months ago

nblackburn commented 8 months ago

I have been having issues integrating this library for a while now due to some issues in how types are being resolved, which doesn't play nicely with astro check. It looks like some attempts have been made to fix this, but sadly this issue still persists for me.

src/layouts/base.astro:89:10 - error ts(2604): Component 'SpeedInsights' is not a valid component.

If this is a Svelte or Vue component, it might have a syntax error that makes it impossible to parse.

89         <SpeedInsights />
            ~~~~~~~~~~~~~

I have noticed that the Astro version is missing from typesVersions and doesn't have a index.d.ts file, which appears to lead it to default back on index.d.ts under ./dist which is not an Astro component.

Related: #36 #54

ViorelMocanu commented 3 months ago

I'm having the same issue.