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, },