Upload sourcemaps to sentry during build (#19403)

This commit is contained in:
James Salter 2021-10-20 11:18:47 +01:00 committed by GitHub
parent c1ca4a0920
commit d24348de81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 137 additions and 5 deletions

View file

@ -9,6 +9,7 @@ const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const SentryCliPlugin = require("@sentry/webpack-plugin");
dotenv.config();
let ogImageUrl = process.env.RIOT_OG_IMAGE_URL;
@ -528,6 +529,12 @@ module.exports = (env, argv) => {
}),
useHMR && new ReactRefreshWebpackPlugin(fullPageErrors ? undefined : { overlay: { entry: false } }),
// upload to sentry if sentry env is present
process.env.SENTRY_DSN &&
new SentryCliPlugin({
release: process.env.RELEASE,
include: "./webapp",
}),
].filter(Boolean),
output: {