From 9e6f78c58e3e67e7ba8c222e744607b4951f975b Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 9 Oct 2023 11:29:25 -0600 Subject: [PATCH] sentry: Enable source map uploads Signed-off-by: Zack Cerza --- .gitignore | 3 +++ vite.config.js | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4d29575..f64df15 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +# Sentry Auth Token +.env.sentry-build-plugin diff --git a/vite.config.js b/vite.config.js index 124d8c7..c7a3294 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,12 +1,23 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +import { sentryVitePlugin } from "@sentry/vite-plugin"; export default defineConfig(() => { return { build: { outDir: "build", + sourcemap: true, // for Sentry }, - plugins: [react()], + plugins: [ + react(), + // Sentry vite plugin goes after all other plugins + sentryVitePlugin({ + authToken: process.env.SENTRY_AUTH_TOKEN, + org: "ceph", + project: "pulpito-ng", + url: "https://sentry.ceph.com/", + }), + ], server: { port: 8081, },