@@ -166,14 +166,14 @@ export async function makeCustomSentryVitePlugins(options?: CustomSentryVitePlug
166
166
console . log ( `[Sentry] Enabled source map generation in the build options with \`${ settingKey } : "hidden"\`.` ) ;
167
167
} ) ;
168
168
169
- // Including all hidden (`.*`) directories by default so that folders like .vercel,
170
- // .netlify, etc are also cleaned up. Additionally, we include the adapter output
171
- // dir which could be a non-hidden directory, like `build` for the Node adapter.
172
- const defaultFileDeletionGlob = [ './.*/**/*.map' , `./${ adapterOutputDir } /**/*.map` ] ;
173
-
174
169
if ( userProvidedFilesToDeleteAfterUpload ) {
175
170
resolveFilesToDeleteAfterUpload ( userProvidedFilesToDeleteAfterUpload ) ;
176
171
} else {
172
+ // Including all hidden (`.*`) directories by default so that folders like .vercel,
173
+ // .netlify, etc are also cleaned up. Additionally, we include the adapter output
174
+ // dir which could be a non-hidden directory, like `build` for the Node adapter.
175
+ const defaultFileDeletionGlob = [ './.*/**/*.map' , `./${ adapterOutputDir } /**/*.map` ] ;
176
+
177
177
consoleSandbox ( ( ) => {
178
178
// eslint-disable-next-line no-console
179
179
console . warn (
@@ -183,8 +183,7 @@ export async function makeCustomSentryVitePlugins(options?: CustomSentryVitePlug
183
183
) ;
184
184
} ) ;
185
185
186
- // In case we enabled source map, we also want to delete them.
187
- // So either use the glob(s) that users specified, or the default one!
186
+ // In case we enabled source maps and users didn't specify a glob patter to delete, we set a default pattern:
188
187
resolveFilesToDeleteAfterUpload ( defaultFileDeletionGlob ) ;
189
188
}
190
189
0 commit comments