From 475d66f29fc87282110fb256c69b77740dd36c7d Mon Sep 17 00:00:00 2001 From: Michael Cousins Date: Tue, 16 Jul 2024 07:43:52 -0400 Subject: [PATCH] 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 --- packages/sveltekit/package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index cbf009831ef0..d2edf5487ed2 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -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",