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/**",