Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ const standardIntegrations = [
release: {
name: sentryReleaseName,
},
sourcemaps: {
filesToDeleteAfterUpload: ['./dist/**/client/**/*.map', './dist/**/server/**/*.map'],
},
},
})] : []),
sitemap({
Expand Down Expand Up @@ -170,9 +173,22 @@ export default defineConfig({
*/
include: ['lit', 'lit/directives/if-defined.js'],
},
/**
* Astro 6 reads `environments.client.build.sourcemap` for client bundles
* instead of the top-level `build.sourcemap` (which only affects server).
* Use 'hidden' to generate .map files without adding //# sourceMappingURL
* comments, so maps are available for Sentry upload but not exposed to users.
*/
environments: {
client: {
build: {
sourcemap: 'hidden',
},
},
},
build: {
/** Source map generation must be turned on for Sentry. */
sourcemap: true,
/** Server source maps for Sentry. */
sourcemap: 'hidden',
rollupOptions: {
onwarn(warning, warn) {
if (shouldSuppressRollupWarning(warning)) return
Expand Down
Loading