From 92433827b5092cf2491a8593c1141f4402f1474b Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 19 Apr 2023 13:22:04 +0200 Subject: [PATCH] fix(sveltekit): Detect sentry release before creating the Vite plugins --- packages/sveltekit/src/vite/sourceMaps.ts | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/packages/sveltekit/src/vite/sourceMaps.ts b/packages/sveltekit/src/vite/sourceMaps.ts index fdabdf7bdb72..88a4c3424719 100644 --- a/packages/sveltekit/src/vite/sourceMaps.ts +++ b/packages/sveltekit/src/vite/sourceMaps.ts @@ -1,5 +1,8 @@ +import { getSentryRelease } from '@sentry/node'; +import { uuid4 } from '@sentry/utils'; import type { SentryVitePluginOptions } from '@sentry/vite-plugin'; import { sentryVitePlugin } from '@sentry/vite-plugin'; +import * as child_process from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; // @ts-ignore -sorcery has no types :( @@ -22,6 +25,10 @@ type SentryVitePluginOptionsOptionalInclude = Omit