V2 sentry (#267)

* chore: add sentry to frontend

* chore: add sentry to server

* chore: report only in production

* chore: add sentry source maps
This commit is contained in:
Carlos Valente
2022-12-08 22:34:17 +01:00
committed by GitHub
parent 6720626bd3
commit 1bb67eb82a
10 changed files with 515 additions and 21 deletions
+17 -2
View File
@@ -1,10 +1,24 @@
import sentryVitePlugin from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import svgrPlugin from 'vite-plugin-svgr';
import viteTsconfigPaths from 'vite-tsconfig-paths';
import { ONTIME_VERSION } from '../server/src/version.js';
export default defineConfig({
plugins: [react(), viteTsconfigPaths(), svgrPlugin()],
plugins: [
react(),
viteTsconfigPaths(),
svgrPlugin(),
sentryVitePlugin({
org: "carlos-valente",
project: "ontime",
include: "./build",
authToken: process.env.SENTRY_AUTH_TOKEN,
release: ONTIME_VERSION,
}),
],
server: {
port: 3000,
},
@@ -14,6 +28,7 @@ export default defineConfig({
environment: 'jsdom',
},
build: {
outDir: './build'
outDir: './build',
sourcemap: true,
}
});