From 8ed6d9735d627ec99274f0d6ad3c31de1824993c Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 4 Feb 2020 16:56:50 -0500 Subject: [PATCH] Revert "disable sentry on electron" This reverts commit bb5e4232bc71ea1d063293db2fecf35138824f4c. --- webpack.electron.config.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/webpack.electron.config.js b/webpack.electron.config.js index 32527f885..6170dd636 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -7,10 +7,12 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); const { DefinePlugin, ProvidePlugin } = require('webpack'); const { getIfUtils, removeEmpty } = require('webpack-config-utils'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); +const SentryWebpackPlugin = require('@sentry/webpack-plugin'); const STATIC_ROOT = path.resolve(__dirname, 'static/'); const DIST_ROOT = path.resolve(__dirname, 'dist/'); const NODE_ENV = process.env.NODE_ENV || 'development'; +const hasSentryToken = process.env.SENTRY_AUTH_TOKEN !== undefined; const { ifProduction } = getIfUtils(NODE_ENV); @@ -92,16 +94,16 @@ let plugins = [ }), ]; -// if (hasSentryToken) { -// plugins.push( -// new SentryWebpackPlugin({ -// include: './dist', -// ignoreFile: '.sentrycliignore', -// ignore: ['node_modules', 'webpack.config.js', 'webworkers'], -// configFile: 'sentry.properties', -// }) -// ); -// } +if (hasSentryToken) { + plugins.push( + new SentryWebpackPlugin({ + include: './dist', + ignoreFile: '.sentrycliignore', + ignore: ['node_modules', 'webpack.config.js', 'webworkers'], + configFile: 'sentry.properties', + }) + ); +} const renderConfig = { target: 'electron-renderer',