mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
ci(sentry): update sentry to use new hosted instance
this might not work but hey it kinda does
This commit is contained in:
1 parent
eaae3c7211
commit
44599c882d
8 files changed
+319
-6
No files matched your search
@@ -1,3 +1,4 @@
|
||||
require('dotenv').config();
|
||||
const path = require('path');
|
||||
|
||||
const {
|
||||
@@ -8,6 +9,8 @@ const {
|
||||
throwUnexpectedConfigError,
|
||||
} = require('@craco/craco');
|
||||
|
||||
const SentryCliPlugin = require('@sentry/webpack-plugin');
|
||||
|
||||
const throwError = (message) =>
|
||||
throwUnexpectedConfigError({
|
||||
packageName: 'craco',
|
||||
@@ -19,6 +22,27 @@ const throwError = (message) =>
|
||||
module.exports = {
|
||||
webpack: {
|
||||
configure: (webpackConfig, { paths }) => {
|
||||
const releaseVersion = process.env.npm_package_version;
|
||||
|
||||
process.env.REACT_APP_SENTRY_RELEASE = releaseVersion;
|
||||
|
||||
if (process.env.SENTRY_RELEASE) {
|
||||
webpackConfig.plugins.push(
|
||||
new SentryCliPlugin({
|
||||
url: 'https://sentry.projecterror.dev',
|
||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
||||
org: 'project-error',
|
||||
project: 'npwd',
|
||||
release: releaseVersion,
|
||||
validate: true,
|
||||
urlPrefix: '~/resources/html',
|
||||
// webpack-specific configuration
|
||||
include: ['../resources/html'],
|
||||
ignore: ['node_modules'],
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const { hasFoundAny, matches } = getLoaders(webpackConfig, loaderByName('babel-loader'));
|
||||
if (!hasFoundAny) throwError('failed to find babel-loader');
|
||||
|
||||
|
||||
Reference in new issue
Block a user