Skip to content

Commit

Permalink
fix(RHINENG-10654): Reimplemenet Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
adonispuente committed Sep 30, 2024
1 parent 02e4e17 commit 07741cc
Show file tree
Hide file tree
Showing 7 changed files with 3,387 additions and 4,104 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ cypress/screenshots
#swc
.swc
.cypress_cache

# Sentry Config File
.env.sentry-build-plugin
2 changes: 1 addition & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const commonConfig = ({ dev }) => {
},
}
: {}),
devtool: false,
devtool: 'hidden-source-map',
resolve: {
extensions: ['.js', '.ts', '.tsx'],
alias: {
Expand Down
17 changes: 17 additions & 0 deletions config/webpack.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const getDynamicModules = require('./get-dynamic-modules');
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');

const deps = require('../package.json').dependencies;

Expand Down Expand Up @@ -87,6 +88,22 @@ const plugins = (dev = false, beta = false, restricted = false) => {
__SENTRY_DEBUG__: false,
}),
...(dev ? [new ReactRefreshWebpackPlugin()] : []),
// Put the Sentry Webpack plugin after all other plugins
...(process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_ORG && process.env.SENTRY_PROJECT
? [
sentryWebpackPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
_experiments: {
moduleMetadata: ({ release }) => ({
authToken: process.env.SENTRY_AUTH_TOKEN,
release,
}),
},
}),
]
: []),
];
};

Expand Down
Loading

0 comments on commit 07741cc

Please sign in to comment.