Commit 64ef553
authored
fix(nuxt): include
# 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 -->sentry.client.config.ts in nuxt app types (#17830)1 parent 5aa7a53 commit 64ef553
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
| |||
0 commit comments