You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adds documentation for the new assets option soon to be released in the Astro
SDK. Functionality it's 1:1 on par with the Vite plugin assets option but we don't expose the
full Vite Plugin API in the Astro SDK; hence the dedicated documentation
---------
Co-authored-by: Shana Matthews <[email protected]>
Copy file name to clipboardExpand all lines: src/platform-includes/sourcemaps/overview/javascript.astro.mdx
+27-8Lines changed: 27 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -28,36 +28,55 @@ export default defineConfig({
28
28
});
29
29
```
30
30
31
-
### Working With Old Authentication Tokens
31
+
### Disable Source Maps Upload
32
32
33
-
Source maps work best with [organization-scoped auth tokens](/product/accounts/auth-tokens/#organization-auth-tokens). If you are using an old self-hosted Sentry version that doesn't yet support org-based tokens or you're using a different type of Sentry auth token, you'll need to additionally specify your `org` slug in your `sourceMapsUploadOptions`:
33
+
You can disable automatic source maps upload in your Astro config:
34
34
35
35
```javascript {filename:astro.config.mjs}
36
36
exportdefaultdefineConfig({
37
37
integrations: [
38
38
sentry({
39
39
// Other Sentry options
40
40
sourceMapsUploadOptions: {
41
-
project:"___PROJECT_SLUG___",
42
-
org:"___ORG_SLUG___",
43
-
authToken:process.env.SENTRY_AUTH_TOKEN,
41
+
enabled:false,
44
42
},
45
43
}),
46
44
],
47
45
});
48
46
```
49
47
50
-
### Disable Source Maps Upload
48
+
### Setting the Source Maps Assets Directory
51
49
52
-
You can disable automatic source maps upload in your Astro config:
50
+
By default, the Sentry Astro integration will look for source maps in sensible default directories, depending on your `outDir`, `rootDir` and `adapter` configuration.
51
+
If these defaults don't work for you (for example, due to an advanced customized build setup or an unsupported adapter), you can specify the `assets` option to point to the folder(s) where your source maps are located:
52
+
53
+
```javascript {filename:astro.config.mjs}
54
+
exportdefaultdefineConfig({
55
+
integrations: [
56
+
sentry({
57
+
sourceMapsUploadOptions: {
58
+
assets: [".clientOut/**/*", ".serverOut/**/*"],
59
+
},
60
+
}),
61
+
],
62
+
});
63
+
```
64
+
65
+
The specified patterns must follow the [glob syntax](https://www.npmjs.com/package/glob#glob-primer).
66
+
67
+
### Working With Old Authentication Tokens
68
+
69
+
Source maps work best with [organization-scoped auth tokens](/product/accounts/auth-tokens/#organization-auth-tokens). If you are using an old self-hosted Sentry version that doesn't yet support org-based tokens or you're using a different type of Sentry auth token, you'll need to additionally specify your `org` slug in your `sourceMapsUploadOptions`:
0 commit comments