You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(nuxt): include sentry.client.config.ts in nuxt app types (#17830)
# What
Fixes#17781 by adding the `sentry.config.client.ts` to the auto
generated tsconfig by extending the types via the [`prepare:types`
hook](https://nuxt.com/docs/4.x/guide/going-further/modules#adding-type-declarations).
This allows `useRuntimeConfig` to be properly typed in the root
`sentry.client.config.ts`, or where ever the client file is found.
Not sure how this could be tested tho, since it is purely types.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a `prepare:types` hook to include the client Sentry config in
Nuxt’s generated `tsconfig` for proper typing.
>
> - **Nuxt module (`packages/nuxt/src/module.ts`)**:
> - **Types setup**: Add `prepare:types` hook to ensure
`tsconfig.include` contains the relative path to the detected client
Sentry config (`sentry.client.config.ts`), enabling proper typing (e.g.,
`useRuntimeConfig`) in root config files for Nuxt v4.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
4de6d43. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
0 commit comments