This is a minimal reproduction for the issue mentioned in this GitHub discussion: getsentry/sentry-javascript#18587
- Sentry is set up for Cloudflare with this plugin:
server/api/sentry.ts - The endpoint with the error is located at:
server/api/error-endpoint.ts - There is no
sentry.client.config.tsfile, as Sentry is only set up for the server side (Cloudflare) in this reproduction
Make sure to install dependencies:
# npm
npm installAnd set the variables for the Sentry config:
- A DSN in
server/api/sentry.ts - Optionally, add
organdprojectin thenuxt.config.tsfile for source map uploads
Build the project:
npm run buildand run the Cloudflare preview:
npm run preview:cfLocally preview production build:
Check out the deployment documentation for more information.