Skip to content

Commit ff17f65

Browse files
feat: use npm-bundled Sentry instead of CDN (#181)
Bundle @sentry/browser with esbuild into a local script served from the same origin. All Sentry calls are guarded with window.Sentry checks so adblockers won't break page functionality. SENTRY_DSN is injected at build time via environment variable.
1 parent 1ba3e7f commit ff17f65

File tree

8 files changed

+602
-14
lines changed

8 files changed

+602
-14
lines changed

.github/workflows/firebase-hosting-merge.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
node-version: '20'
2525
- run: npm ci
2626
- run: npm run build -- prod
27+
env:
28+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2729
- uses: FirebaseExtended/action-hosting-deploy@v0
2830
with:
2931
repoToken: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
node-version: '20'
2424
- run: npm ci
2525
- run: npm run build -- staging
26+
env:
27+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2628
- uses: FirebaseExtended/action-hosting-deploy@v0
2729
with:
2830
repoToken: '${{ secrets.GITHUB_TOKEN }}'

0 commit comments

Comments
 (0)