Skip to content

Commit c30a402

Browse files
committed
build(sentry): get rid of Sentry Vite plugin
Our AzDO pipeline is now handling sourcemaps upload (using sentry-cli), so there is no need for the Sentry Vite plugin anymore. Refs: LINK-2324
1 parent dbb8994 commit c30a402

6 files changed

Lines changed: 7 additions & 366 deletions

File tree

.env.local.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ REACT_APP_SENTRY_TRACES_SAMPLE_RATE=
2424
REACT_APP_SENTRY_TRACE_PROPAGATION_TARGETS=http://localhost:8080
2525
REACT_APP_SENTRY_REPLAYS_SESSION_SAMPLE_RATE=
2626
REACT_APP_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=
27-
SENTRY_PROJECT=linkedcomponents-ui

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ ARG REACT_APP_SENTRY_TRACES_SAMPLE_RATE
7979
ARG REACT_APP_SENTRY_TRACE_PROPAGATION_TARGETS
8080
ARG REACT_APP_SENTRY_REPLAYS_SESSION_SAMPLE_RATE
8181
ARG REACT_APP_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE
82-
ARG SENTRY_PROJECT
8382

8483
# Set Matomo settings
8584
ARG REACT_APP_MATOMO_SRC_URL
@@ -111,10 +110,7 @@ ARG REACT_APP_WEB_STORE_INTEGRATION_ENABLED
111110
# Vite/Rollup build args
112111
ARG ROLLUP_INLINE_DYNAMIC_IMPORTS
113112

114-
# When building locally with Docker Compose, the auth token can be provided using SENTRY_AUTH_TOKEN environment variable.
115-
# Our AzDO pipeline uses /secrets/SENTRY_AUTH_TOKEN to pass the auth token so this works there too.
116-
RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN,gid=0,target=/secrets/SENTRY_AUTH_TOKEN \
117-
SENTRY_AUTH_TOKEN="$(cat /secrets/SENTRY_AUTH_TOKEN 2>/dev/null)" yarn build
113+
RUN yarn build
118114

119115
RUN yarn generate-sitemap
120116
RUN yarn generate-robots

docker-compose.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ services:
44
build:
55
context: .
66
target: ${DOCKER_TARGET:-development}
7-
secrets:
8-
- SENTRY_AUTH_TOKEN
97
env_file:
108
- .env
119
- .env.local
@@ -14,6 +12,3 @@ services:
1412
- '/app/node_modules'
1513
ports:
1614
- '3000:8000'
17-
secrets:
18-
SENTRY_AUTH_TOKEN:
19-
environment: SENTRY_AUTH_TOKEN

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"@faker-js/faker": "^8.4.1",
1414
"@nabla/vite-plugin-eslint": "^2.0.5",
1515
"@sentry/react": "^9.15.0",
16-
"@sentry/vite-plugin": "^3.4.0",
1716
"@testing-library/jest-dom": "^6.4.2",
1817
"@testing-library/react": "15.0.7",
1918
"@testing-library/user-event": "14.5.2",

vite.config.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
import eslint from '@nabla/vite-plugin-eslint';
2-
import { sentryVitePlugin } from '@sentry/vite-plugin';
32
import react from '@vitejs/plugin-react-swc';
43
import { defineConfig } from 'vite';
54
import { configDefaults, coverageConfigDefaults } from 'vitest/config';
65

76
export default defineConfig(({ mode }) => ({
87
base: '/',
98
envPrefix: 'REACT_APP_',
10-
plugins: [
11-
react(),
12-
mode !== 'test' && eslint(),
13-
// Put the Sentry vite plugin after all other plugins
14-
process.env.SENTRY_AUTH_TOKEN && sentryVitePlugin({
15-
project: process.env.SENTRY_PROJECT,
16-
authToken: process.env.SENTRY_AUTH_TOKEN,
17-
release: { name: process.env.REACT_APP_SENTRY_RELEASE },
18-
telemetry: false,
19-
}),
20-
],
9+
plugins: [react(), mode !== 'test' && eslint()],
2110
build: {
2211
outDir: './build',
2312
emptyOutDir: true,

0 commit comments

Comments
 (0)