@sentry/gatsby 8.30.0 → 8.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,6 +65,24 @@ module.exports = {
65
65
  };
66
66
  ```
67
67
 
68
+ Additionally, you can delete source map files after they have been uploaded by setting the `deleteSourcemapsAfterUpload`
69
+ option to be `true`.
70
+
71
+ ```javascript
72
+ module.exports = {
73
+ // ...
74
+ plugins: [
75
+ {
76
+ resolve: '@sentry/gatsby',
77
+ options: {
78
+ deleteSourcemapsAfterUpload: true,
79
+ },
80
+ },
81
+ // ...
82
+ ],
83
+ };
84
+ ```
85
+
68
86
  ## Links
69
87
 
70
88
  - [Official SDK Docs](https://docs.sentry.io/quickstart/)
package/gatsby-node.js CHANGED
@@ -7,12 +7,15 @@ const SENTRY_USER_CONFIG = ['./sentry.config.js', './sentry.config.ts'];
7
7
  exports.onCreateWebpackConfig = ({ getConfig, actions }, options) => {
8
8
  const enableClientWebpackPlugin = options.enableClientWebpackPlugin !== false;
9
9
  if (process.env.NODE_ENV === 'production' && enableClientWebpackPlugin) {
10
+ const deleteSourcemapsAfterUpload = options.deleteSourcemapsAfterUpload === true;
10
11
  actions.setWebpackConfig({
11
12
  plugins: [
12
13
  sentryWebpackPlugin({
13
14
  sourcemaps: {
14
15
  // Only include files from the build output directory
15
16
  assets: ['./public/**'],
17
+ // Delete source files after uploading
18
+ filesToDeleteAfterUpload: deleteSourcemapsAfterUpload ? ['./public/**/*.map'] : undefined,
16
19
  // Ignore files that aren't users' source code related
17
20
  ignore: [
18
21
  'polyfill-*', // related to polyfills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/gatsby",
3
- "version": "8.30.0",
3
+ "version": "8.31.0",
4
4
  "description": "Official Sentry SDK for Gatsby.js",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby",
@@ -45,10 +45,10 @@
45
45
  "access": "public"
46
46
  },
47
47
  "dependencies": {
48
- "@sentry/core": "8.30.0",
49
- "@sentry/react": "8.30.0",
50
- "@sentry/types": "8.30.0",
51
- "@sentry/utils": "8.30.0",
48
+ "@sentry/core": "8.31.0",
49
+ "@sentry/react": "8.31.0",
50
+ "@sentry/types": "8.31.0",
51
+ "@sentry/utils": "8.31.0",
52
52
  "@sentry/webpack-plugin": "2.22.3"
53
53
  },
54
54
  "peerDependencies": {