Skip to content

Commit 1dea45e

Browse files
authored
fix(sveltekit): Use sentry.properties file when uploading source maps (#7890)
1 parent de51011 commit 1dea45e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/sveltekit/src/vite/sourceMaps.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ export async function makeCustomSentryVitePlugin(options?: SentryVitePluginOptio
4242
const svelteConfig = await loadSvelteConfig();
4343

4444
const outputDir = await getAdapterOutputDir(svelteConfig);
45+
const hasSentryProperties = fs.existsSync(path.resolve(process.cwd(), 'sentry.properties'));
4546

4647
const defaultPluginOptions: SentryVitePluginOptions = {
4748
include: [
4849
{ paths: [`${outputDir}/client`] },
4950
{ paths: [`${outputDir}/server/chunks`] },
5051
{ paths: [`${outputDir}/server`], ignore: ['chunks/**'] },
5152
],
53+
configFile: hasSentryProperties ? 'sentry.properties' : undefined,
5254
};
5355

5456
const mergedOptions = {

0 commit comments

Comments
 (0)