Skip to content

Commit

Permalink
build(sentry): add sourcemaps upload to sentry (#642)
Browse files Browse the repository at this point in the history
perf: import material submodules in waiting screen
  • Loading branch information
swouf authored Nov 12, 2024
1 parent 02572f7 commit 725144e
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_VERSION: ${{ github.sha }}
VITE_WS_HOST: ${{ vars.WS_HOST }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# add any env variable needed by your app here
run: yarn build
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_VERSION: ${{ steps.set-version.outputs.VERSION }}
VITE_WS_HOST: ${{ vars.WS_HOST }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# add any env variable needed by your app here
run: yarn build
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
VITE_VERSION: ${{ steps.set-version.outputs.VERSION }}
VITE_WS_HOST: ${{ vars.WS_HOST }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# add any env variable needed by your app here
run: yarn build
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ yarn-debug.log*
cypress/screenshots/
cypress/videos/
cypress/downloads/

# Sentry Config File
.env.sentry-build-plugin
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@mui/x-data-grid": "^6.19.4",
"@nivo/boxplot": "^0.87.0",
"@sentry/react": "^8.0.0",
"@sentry/vite-plugin": "^2.22.6",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-query-devtools": "^4.36.1",
"@uiw/react-codemirror": "^4.21.22",
Expand Down
5 changes: 4 additions & 1 deletion src/modules/common/WaitingScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { FC } from 'react';
import { useTranslation } from 'react-i18next';

import { Alert, LinearProgress, Stack, Typography } from '@mui/material';
import Alert from '@mui/material/Alert';
import LinearProgress from '@mui/material/LinearProgress';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';

import { ActivityStatus } from '@/interfaces/interactionProcess';

Expand Down
8 changes: 8 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { resolve } from 'path';
import { UserConfigExport, defineConfig, loadEnv } from 'vite';
import checker from 'vite-plugin-checker';
import istanbul from 'vite-plugin-istanbul';
import { sentryVitePlugin } from "@sentry/vite-plugin";

// https://vitejs.dev/config/
export default ({ mode }: { mode: string }): UserConfigExport => {
Expand All @@ -28,6 +29,7 @@ export default ({ mode }: { mode: string }): UserConfigExport => {
},
build: {
outDir: 'build',
sourcemap: true,
},
plugins: [
mode === 'test'
Expand All @@ -48,6 +50,12 @@ export default ({ mode }: { mode: string }): UserConfigExport => {
forceBuildInstrument: mode === 'test',
checkProd: true,
}),
// Put the Sentry vite plugin after all other plugins
sentryVitePlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "graasp",
project: "graasp-app-collaborative-ideation",
}),
],
resolve: {
alias: {
Expand Down
Loading

0 comments on commit 725144e

Please sign in to comment.