Update dependency @sentry/webpack-plugin to v2 (#25507)

* Update dependency @sentry/webpack-plugin to v2

* Follow migration guide

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
renovate[bot] 2023-06-02 14:21:49 +01:00 committed by GitHub
parent 2a078dd713
commit 945c0793b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 143 additions and 29 deletions

View file

@ -8,7 +8,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload");
const SentryCliPlugin = require("@sentry/webpack-plugin");
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
const crypto = require("crypto");
// XXX: mangle Crypto::createHash to replace md4 with sha256, output.hashFunction is insufficient as multiple bits
@ -660,9 +660,11 @@ module.exports = (env, argv) => {
// upload to sentry if sentry env is present
process.env.SENTRY_DSN &&
new SentryCliPlugin({
sentryWebpackPlugin({
release: process.env.VERSION,
include: "./webapp/bundles",
sourcemaps: {
paths: "./webapp/bundles/**",
},
errorHandler: (err, invokeErr, compilation) => {
compilation.warnings.push("Sentry CLI Plugin: " + err.message);
console.log(`::warning title=Sentry error::${err.message}`);