Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(RHINENG-10654): Reimplement Sentry #2881

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -52,7 +52,7 @@ const commonConfig = ({ dev }) => {
},
}
: {}),
devtool: false,
devtool: 'hidden-source-map',
adonispuente marked this conversation as resolved.
Show resolved Hide resolved
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
adonispuente marked this conversation as resolved.
Show resolved Hide resolved
? [
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
Loading