From ade4b9222171b32f7bedbd587193dd2ddcb1f438 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Fri, 22 Nov 2024 20:43:39 +0100 Subject: [PATCH] feat(nuxt): Only delete public source maps --- packages/nuxt/src/vite/sourceMaps.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nuxt/src/vite/sourceMaps.ts b/packages/nuxt/src/vite/sourceMaps.ts index beea7e18d8f2..2f90094e6138 100644 --- a/packages/nuxt/src/vite/sourceMaps.ts +++ b/packages/nuxt/src/vite/sourceMaps.ts @@ -81,7 +81,7 @@ export function getPluginOptions( consoleSandbox(() => { // eslint-disable-next-line no-console console.log( - '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [".*/**/*.map"]` to delete generated source maps after they were uploaded to Sentry.', + '[Sentry] Setting `sentry.sourceMapsUploadOptions.sourcemaps.filesToDeleteAfterUpload: [".*/**/public/**/*.map"]` to delete generated source maps after they were uploaded to Sentry.', ); }); } @@ -108,7 +108,7 @@ export function getPluginOptions( filesToDeleteAfterUpload: sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload ? sourceMapsUploadOptions.sourcemaps?.filesToDeleteAfterUpload : deleteFilesAfterUpload - ? ['.*/**/*.map'] + ? ['.*/**/public/**/*.map'] : undefined, rewriteSources: (source: string) => normalizePath(source), ...moduleOptions?.unstable_sentryBundlerPluginOptions?.sourcemaps, @@ -279,7 +279,7 @@ function warnExplicitlyDisabledSourceMap(settingKey: string): void { consoleSandbox(() => { // eslint-disable-next-line no-console console.warn( - `[Sentry] Parts of source map generation are currently disabled in your Nuxt configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\`.`, + `[Sentry] Parts of source map generation are currently disabled in your Nuxt configuration (\`${settingKey}: false\`). This setting is either a default setting or was explicitly set in your configuration. Sentry won't override this setting. Without source maps, code snippets on the Sentry Issues page will remain minified. To show unminified code, enable source maps in \`${settingKey}\` (e.g. by setting them to \`hidden\`).`, ); }); }