Skip to content

Commit

Permalink
fix(sveltekit): Add Vite peer dep for proper type resolution (#12926)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcous authored Jul 16, 2024
1 parent 9d1b35d commit 475d66f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"access": "public"
},
"peerDependencies": {
"@sveltejs/kit": "1.x || 2.x"
"@sveltejs/kit": "1.x || 2.x",
"vite": "*"
},
"peerDependenciesMeta": {
"vite": {
"optional": true
}
},
"dependencies": {
"@sentry/core": "8.17.0",
Expand Down

0 comments on commit 475d66f

Please sign in to comment.