Files
SnapOtter/apps/web/package.json
T
SnapOtterandGitHub 1c202c6ef0 feat(analytics): upload web source maps to Sentry + tie release to build (#369)
* feat(analytics): upload web source maps to Sentry + tie release to build

Web crash reports were unusable: the bundle ships minified with no source
maps uploaded, and every build reported as the frozen APP_VERSION, so a
Sentry error showed an unreadable stack under a single release.

- Add @sentry/vite-plugin: emit hidden source maps and upload them by debug
  id when SENTRY_AUTH_TOKEN is present (published Docker build only), then
  delete the maps so they never ship. No-op for dev and the source archive.
- Set the Sentry release from SENTRY_RELEASE / VITE_SENTRY_RELEASE (the Docker
  build passes the release version), falling back to APP_VERSION.
- Relax beforeSend so app bundle frames keep a host-stripped path (Sentry needs
  it to match the uploaded map) while the instance hostname, error message, and
  PII stay stripped. Filesystem paths still collapse to the basename.
- Wire the Dockerfile (sentry_auth_token build secret + SENTRY_RELEASE arg/env)
  and the release docker job.

* fix(analytics): point source map upload at the snapotter org (project node)
2026-06-29 10:47:30 +08:00

58 lines
1.5 KiB
JSON

{
"name": "@snapotter/web",
"version": "2.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"lint": "biome check src/",
"typecheck": "tsc --noEmit",
"clean": "rm -rf dist"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@sentry/react": "^10.59.0",
"@snapotter/shared": "workspace:*",
"@use-gesture/react": "^10.3.1",
"clsx": "^2.1.0",
"fflate": "^0.8.3",
"fuse.js": "^7.4.2",
"jszip": "^3.10.1",
"konva": "^10",
"leaflet": "^1.9.4",
"lucide-react": "^0.577.0",
"pdfjs-dist": "^6.0.227",
"posthog-js": "^1.391.9",
"qr-code-styling": "^1.9.2",
"react": "^19.2.7",
"react-colorful": "^5",
"react-dom": "^19.2.7",
"react-hotkeys-hook": "^5",
"react-image-crop": "^11.1.2",
"react-konva": "^19",
"react-router-dom": "^7.18.0",
"sonner": "^2.0.7",
"tailwind-merge": "^2.6.0",
"use-image": "^1",
"wavesurfer.js": "^7.12.8",
"zundo": "^2",
"zustand": "^5.0.14"
},
"devDependencies": {
"@sentry/vite-plugin": "^5.3.0",
"@tailwindcss/vite": "^4.3.1",
"@types/leaflet": "^1.9.21",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.0",
"tailwindcss": "^4.3.1",
"typescript": "^5.7.0",
"vite": "^6.4.3"
},
"license": "AGPL-3.0"
}