From 74ddbeba10003ef119436a9e351384e802f3e62a Mon Sep 17 00:00:00 2001
From: s1gr1d
Date: Wed, 13 Aug 2025 10:47:14 +0200
Subject: [PATCH 1/2] docs(nuxt): Remove beta notice
---
packages/nuxt/README.md | 24 ++++++++----------------
packages/nuxt/src/module.ts | 23 +++++++++++++----------
2 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/packages/nuxt/README.md b/packages/nuxt/README.md
index 1513d8a5f6d9..eae1b36b03e5 100644
--- a/packages/nuxt/README.md
+++ b/packages/nuxt/README.md
@@ -4,15 +4,13 @@
-# Official Sentry SDK for Nuxt (BETA)
+# Official Sentry SDK for Nuxt
[](https://www.npmjs.com/package/@sentry/nuxt)
[](https://www.npmjs.com/package/@sentry/nuxt)
[](https://www.npmjs.com/package/@sentry/nuxt)
-This SDK is in **Beta**. The API is stable but updates may include minor changes in behavior. Please reach out on
-[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. This
-SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/) see our
+This SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/) see our
[Vue SDK here](https://github.com/getsentry/sentry-javascript/tree/develop/packages/vue).
## Links
@@ -21,17 +19,13 @@ SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/)
## Compatibility
-The minimum supported version of Nuxt is `3.0.0`.
+The minimum supported version of Nuxt is `3.7.0` (`3.14.0+` recommended).
## General
This package is a wrapper around `@sentry/node` for the server and `@sentry/vue` for the client side, with added
functionality related to Nuxt.
-**Limitations:**
-
-- Server monitoring is not available during development mode (`nuxt dev`)
-
## Manual Setup
### 1. Prerequisites & Installation
@@ -112,20 +106,18 @@ Sentry.init({
## Uploading Source Maps
To upload source maps, you have to enable client source maps in your `nuxt.config.ts`. Then, you add your project
-settings to the `sentry.sourceMapsUploadOptions` of your `nuxt.config.ts`:
+settings to `sentry` in your `nuxt.config.ts`:
```javascript
// nuxt.config.ts
export default defineNuxtConfig({
- sourcemap: { client: true },
+ sourcemap: { client: 'hidden' },
modules: ['@sentry/nuxt/module'],
sentry: {
- sourceMapsUploadOptions: {
- org: 'your-org-slug',
- project: 'your-project-slug',
- authToken: process.env.SENTRY_AUTH_TOKEN,
- },
+ org: 'your-org-slug',
+ project: 'your-project-slug',
+ authToken: process.env.SENTRY_AUTH_TOKEN,
},
});
```
diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts
index 0e6d92636246..cb20b0282d96 100644
--- a/packages/nuxt/src/module.ts
+++ b/packages/nuxt/src/module.ts
@@ -112,15 +112,6 @@ export default defineNuxtModule({
nuxt.hooks.hook('nitro:init', nitro => {
if (serverConfigFile?.includes('.server.config')) {
- if (nitro.options.dev) {
- consoleSandbox(() => {
- // eslint-disable-next-line no-console
- console.log(
- '[Sentry] Your application is running in development mode. Note: @sentry/nuxt does not work as expected on the server-side (Nitro). Errors are reported, but tracing does not work.',
- );
- });
- }
-
consoleSandbox(() => {
const serverDir = nitro.options.output.serverDir;
@@ -154,8 +145,20 @@ export default defineNuxtModule({
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.log(
- `[Sentry] Using your \`${serverConfigFile}\` file for the server-side Sentry configuration. Make sure to add the Node option \`import\` to the Node command where you deploy and/or run your application. This preloads the Sentry configuration at server startup. You can do this via a command-line flag (\`node --import ${serverConfigRelativePath} [...]\`) or via an environment variable (\`NODE_OPTIONS='--import ${serverConfigRelativePath}' node [...]\`).`,
+ `[Sentry] Using \`${serverConfigFile}\` for server-side Sentry configuration. To activate the Sentry on the Nuxt server-side, this file must be preloaded when starting your application. Make sure to add this where you deploy and/or run your application. Read more here: https://docs.sentry.io/platforms/javascript/guides/nuxt/install/.`,
);
+
+ if (nitro.options.dev) {
+ // eslint-disable-next-line no-console
+ console.log(
+ `[Sentry] During development, preload Sentry with the NODE_OPTIONS environment variable: \`NODE_OPTIONS='--import ${serverConfigRelativePath}' nuxt dev\`. The file is generated in the build directory (usually '.nuxt'). If you delete the build directory, run \`nuxt dev\` to regenerate it.`,
+ );
+ } else {
+ // eslint-disable-next-line no-console
+ console.log(
+ `[Sentry] When running your built application, preload Sentry via a command-line flag (\`node --import ${serverConfigRelativePath} [...]\`) or via an environment variable (\`NODE_OPTIONS='--import ${serverConfigRelativePath}' node [...]\`).`,
+ );
+ }
});
}
}
From 15acde8e5515be11583ff018ede28c43f81baf5c Mon Sep 17 00:00:00 2001
From: s1gr1d
Date: Wed, 13 Aug 2025 11:00:44 +0200
Subject: [PATCH 2/2] remove 'the'
---
packages/nuxt/src/module.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts
index cb20b0282d96..5e1343b1ebaa 100644
--- a/packages/nuxt/src/module.ts
+++ b/packages/nuxt/src/module.ts
@@ -145,7 +145,7 @@ export default defineNuxtModule({
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.log(
- `[Sentry] Using \`${serverConfigFile}\` for server-side Sentry configuration. To activate the Sentry on the Nuxt server-side, this file must be preloaded when starting your application. Make sure to add this where you deploy and/or run your application. Read more here: https://docs.sentry.io/platforms/javascript/guides/nuxt/install/.`,
+ `[Sentry] Using \`${serverConfigFile}\` for server-side Sentry configuration. To activate Sentry on the Nuxt server-side, this file must be preloaded when starting your application. Make sure to add this where you deploy and/or run your application. Read more here: https://docs.sentry.io/platforms/javascript/guides/nuxt/install/.`,
);
if (nitro.options.dev) {