feat(nuxt): Add Cloudflare Nitro plugin (#15597)
A Nitro plugin for @sentry/nuxt which initializes Sentry when deployed to Cloudflare (cloudflare-pages preset).
Add @sentry/cloudflare as additional dependency (same version as @sentry/nuxt)
Remove the previous server config file: sentry.server.config.ts
Add a plugin in server/plugins (e.g. server/plugins/sentry-cloudflare-setup.ts)
Add this code in your plugin file
// server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
export default defineNitroPlugin(
sentryCloudflareNitroPlugin({
dsn: 'https://dsn',
tracesSampleRate: 1.0,
}),
);
or with access to nitroApp:
// server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp) => {
// You can access nitroApp here if needed
return ({
dsn: 'https://dsn',
tracesSampleRate: 1.0,
})
}))
| Path | Size |
|---|---|
| @sentry/browser | 23.42 KB |
| @sentry/browser - with treeshaking flags | 23.2 KB |
| @sentry/browser (incl. Tracing) | 38.11 KB |
| @sentry/browser (incl. Tracing, Replay) | 75.35 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 68.61 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 80.01 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 91.81 KB |
| @sentry/browser (incl. Feedback) | 39.79 KB |
| @sentry/browser (incl. sendFeedback) | 28.02 KB |
| @sentry/browser (incl. FeedbackAsync) | 32.8 KB |
| @sentry/react | 25.16 KB |
| @sentry/react (incl. Tracing) | 40.04 KB |
| @sentry/vue | 27.69 KB |
| @sentry/vue (incl. Tracing) | 39.9 KB |
| @sentry/svelte | 23.45 KB |
| CDN Bundle | 24.9 KB |
| CDN Bundle (incl. Tracing) | 38.19 KB |
| CDN Bundle (incl. Tracing, Replay) | 73.24 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 78.57 KB |
| CDN Bundle - uncompressed | 72.75 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 113.89 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 225.27 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 237.8 KB |
| @sentry/nextjs (client) | 41.64 KB |
| @sentry/sveltekit (client) | 38.56 KB |
| @sentry/node | 150.68 KB |
| @sentry/node - without tracing | 96.32 KB |
| @sentry/aws-serverless | 121.48 KB |
Fetched March 31, 2026