Skip to content

Commit 475d66f

Browse files
authored
fix(sveltekit): Add Vite peer dep for proper type resolution (#12926)
Add a simple, optional peer dependency on Vite to `@sentry/sveltekit` to ensure that it picks up whatever version of Vite is being used in the specific package it's installed in. This is necessary because `pnpm` otherwise could resolve the `vite` import to a wrong version, especially in monorepo environments
1 parent 9d1b35d commit 475d66f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/sveltekit/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131
"access": "public"
3232
},
3333
"peerDependencies": {
34-
"@sveltejs/kit": "1.x || 2.x"
34+
"@sveltejs/kit": "1.x || 2.x",
35+
"vite": "*"
36+
},
37+
"peerDependenciesMeta": {
38+
"vite": {
39+
"optional": true
40+
}
3541
},
3642
"dependencies": {
3743
"@sentry/core": "8.17.0",

0 commit comments

Comments
 (0)