about summary refs log tree commit diff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 3302c47a4..9a238e549 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -2,6 +2,8 @@ const createExpoWebpackConfigAsync = require('@expo/webpack-config')
 const {withAlias} = require('@expo/webpack-config/addons')
 const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
 const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer')
+const {sentryWebpackPlugin} = require('@sentry/webpack-plugin')
+const {version} = require('./package.json')
 
 const GENERATE_STATS = process.env.EXPO_PUBLIC_GENERATE_STATS === '1'
 const OPEN_ANALYZER = process.env.EXPO_PUBLIC_OPEN_ANALYZER === '1'
@@ -44,5 +46,19 @@ module.exports = async function (env, argv) {
       }),
     )
   }
+  if (process.env.SENTRY_AUTH_TOKEN) {
+    config.plugins.push(
+      sentryWebpackPlugin({
+        org: 'blueskyweb',
+        project: 'app',
+        authToken: process.env.SENTRY_AUTH_TOKEN,
+        release: {
+          // env is undefined for Render.com builds, fall back
+          name: process.env.SENTRY_RELEASE || version,
+          dist: process.env.SENTRY_DIST,
+        },
+      }),
+    )
+  }
   return config
 }