From 38675761372e3a58791839b0c02faf3f46739e3f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 19 Jan 2024 19:53:52 +0000 Subject: [PATCH 1/2] Add workaround for webpack builds on platforms unsupported by Sentry Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- webpack.config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 408ffae481..437aab6eb5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,6 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const TerserPlugin = require("terser-webpack-plugin"); const CssMinimizerPlugin = require("css-minimizer-webpack-plugin"); const HtmlWebpackInjectPreload = require("@principalstudio/html-webpack-inject-preload"); -const { sentryWebpackPlugin } = require("@sentry/webpack-plugin"); const crypto = require("crypto"); const CopyWebpackPlugin = require("copy-webpack-plugin"); @@ -707,9 +706,11 @@ module.exports = (env, argv) => { files: [{ match: /.*Inter.*\.woff2$/ }], }), - // upload to sentry if sentry env is present + // Upload to sentry if sentry env is present + // This plugin fails to import on some platforms like ppc64le & s390x even if the plugin isn't called, + // so we require it conditionally. process.env.SENTRY_DSN && - sentryWebpackPlugin({ + require("@sentry/webpack-plugin").sentryWebpackPlugin({ release: process.env.VERSION, sourcemaps: { paths: "./webapp/bundles/**", From 5dd1ed9aacb81ee99e1317a3bd8c8278b38bf37a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 22 Jan 2024 08:49:32 +0000 Subject: [PATCH 2/2] Update webpack.config.js --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 437aab6eb5..a5898f45fd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -707,7 +707,7 @@ module.exports = (env, argv) => { }), // Upload to sentry if sentry env is present - // This plugin fails to import on some platforms like ppc64le & s390x even if the plugin isn't called, + // This plugin throws an error on import on some platforms like ppc64le & s390x even if the plugin isn't called, // so we require it conditionally. process.env.SENTRY_DSN && require("@sentry/webpack-plugin").sentryWebpackPlugin({