Skip to content

Commit

Permalink
Bumpet sentry/webpack-plugin til 2.14.1 og sentry/react til 7.101.1 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bragejahren authored Feb 22, 2024
1 parent baa72bb commit 0c0159d
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 87 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@portabletext/react": "^3.0.7",
"@portabletext/toolkit": "^2.0.8",
"@sanity/client": "^6.4.9",
"@sentry/react": "^7.93.0",
"@sentry/react": "^7.101.1",
"amplitude-js": "^8.21.9",
"axios": "1.6.1",
"classnames": "^2.3.2",
Expand Down Expand Up @@ -146,7 +146,7 @@
"@babel/preset-typescript": "^7.23.3",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
"@portabletext/types": "^2.0.6",
"@sentry/webpack-plugin": "^1.20.1",
"@sentry/webpack-plugin": "^2.14.1",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@types/amplitude-js": "^8.16.5",
Expand Down
20 changes: 11 additions & 9 deletions src/webpack/webpack.production.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import SentryCliPlugin from '@sentry/webpack-plugin';
import { sentryWebpackPlugin } from '@sentry/webpack-plugin';
import CssMinimizerWebpackPlugin from 'css-minimizer-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
Expand All @@ -22,18 +22,20 @@ const prodConfig: webpack.Configuration = mergeWithRules({
filename: '[name].[contenthash].css',
}),
new CssMinimizerWebpackPlugin(),
new SentryCliPlugin({
include: 'dist',
sentryWebpackPlugin({
org: 'nav',
project: 'familie-ks-soknad',
authToken: process.env.SENTRY_AUTH_TOKEN,
url: 'https://sentry.gc.nav.no/',
release: process.env.SENTRY_RELEASE,
urlPrefix: `~${process.env.BASE_PATH}`,
errorHandler: (err, _invokeErr, compilation) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
compilation.warnings.push('Sentry CLI Plugin: ' + err.message);
release: {
name: process.env.SENTRY_RELEASE,
uploadLegacySourcemaps: {
paths: ['dist'],
urlPrefix: `~${process.env.BASE_PATH}`,
},
},
errorHandler: err => {
console.warn('Sentry CLI Plugin: ' + err.message);
},
}),
].filter(val => !!val),
Expand Down
Loading

0 comments on commit 0c0159d

Please sign in to comment.