File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ const standardIntegrations = [
9696 release : {
9797 name : sentryReleaseName ,
9898 } ,
99+ sourcemaps : {
100+ filesToDeleteAfterUpload : [ './dist/**/client/**/*.map' , './dist/**/server/**/*.map' ] ,
101+ } ,
99102 } ,
100103 } ) ] : [ ] ) ,
101104 sitemap ( {
@@ -170,9 +173,22 @@ export default defineConfig({
170173 */
171174 include : [ 'lit' , 'lit/directives/if-defined.js' ] ,
172175 } ,
176+ /**
177+ * Astro 6 reads `environments.client.build.sourcemap` for client bundles
178+ * instead of the top-level `build.sourcemap` (which only affects server).
179+ * Use 'hidden' to generate .map files without adding //# sourceMappingURL
180+ * comments, so maps are available for Sentry upload but not exposed to users.
181+ */
182+ environments : {
183+ client : {
184+ build : {
185+ sourcemap : 'hidden' ,
186+ } ,
187+ } ,
188+ } ,
173189 build : {
174- /** Source map generation must be turned on for Sentry. */
175- sourcemap : true ,
190+ /** Server source maps for Sentry. */
191+ sourcemap : 'hidden' ,
176192 rollupOptions : {
177193 onwarn ( warning , warn ) {
178194 if ( shouldSuppressRollupWarning ( warning ) ) return
You can’t perform that action at this time.
0 commit comments