Skip to content

Commit efaf8c5

Browse files
committed
adjust comments
1 parent 28449b3 commit efaf8c5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/sveltekit/src/vite/sourceMaps.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ export async function makeCustomSentryVitePlugins(options?: CustomSentryVitePlug
166166
console.log(`[Sentry] Enabled source map generation in the build options with \`${settingKey}: "hidden"\`.`);
167167
});
168168

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-
174169
if (userProvidedFilesToDeleteAfterUpload) {
175170
resolveFilesToDeleteAfterUpload(userProvidedFilesToDeleteAfterUpload);
176171
} 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+
177177
consoleSandbox(() => {
178178
// eslint-disable-next-line no-console
179179
console.warn(
@@ -183,8 +183,7 @@ export async function makeCustomSentryVitePlugins(options?: CustomSentryVitePlug
183183
);
184184
});
185185

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:
188187
resolveFilesToDeleteAfterUpload(defaultFileDeletionGlob);
189188
}
190189

0 commit comments

Comments
 (0)