Skip to content

Commit 2ec09c9

Browse files
authored
docs(nuxt): Remove beta notice (#17400)
Removes the beta notice from the readme. I also changed some logs as it's actually possible to enable tracing during dev mode - thankfully, the command prints you the correct path to the Sentry server config 🙌
1 parent 61b1dff commit 2ec09c9

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

packages/nuxt/README.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
</a>
55
</p>
66

7-
# Official Sentry SDK for Nuxt (BETA)
7+
# Official Sentry SDK for Nuxt
88

99
[![npm version](https://img.shields.io/npm/v/@sentry/nuxt.svg)](https://www.npmjs.com/package/@sentry/nuxt)
1010
[![npm dm](https://img.shields.io/npm/dm/@sentry/nuxt.svg)](https://www.npmjs.com/package/@sentry/nuxt)
1111
[![npm dt](https://img.shields.io/npm/dt/@sentry/nuxt.svg)](https://www.npmjs.com/package/@sentry/nuxt)
1212

13-
This SDK is in **Beta**. The API is stable but updates may include minor changes in behavior. Please reach out on
14-
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. This
15-
SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/) see our
13+
This SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/) see our
1614
[Vue SDK here](https://github.com/getsentry/sentry-javascript/tree/develop/packages/vue).
1715

1816
## Links
@@ -21,17 +19,13 @@ SDK is for [Nuxt](https://nuxt.com/). If you're using [Vue](https://vuejs.org/)
2119

2220
## Compatibility
2321

24-
The minimum supported version of Nuxt is `3.0.0`.
22+
The minimum supported version of Nuxt is `3.7.0` (`3.14.0+` recommended).
2523

2624
## General
2725

2826
This package is a wrapper around `@sentry/node` for the server and `@sentry/vue` for the client side, with added
2927
functionality related to Nuxt.
3028

31-
**Limitations:**
32-
33-
- Server monitoring is not available during development mode (`nuxt dev`)
34-
3529
## Manual Setup
3630

3731
### 1. Prerequisites & Installation
@@ -112,20 +106,18 @@ Sentry.init({
112106
## Uploading Source Maps
113107

114108
To upload source maps, you have to enable client source maps in your `nuxt.config.ts`. Then, you add your project
115-
settings to the `sentry.sourceMapsUploadOptions` of your `nuxt.config.ts`:
109+
settings to `sentry` in your `nuxt.config.ts`:
116110

117111
```javascript
118112
// nuxt.config.ts
119113
export default defineNuxtConfig({
120-
sourcemap: { client: true },
114+
sourcemap: { client: 'hidden' },
121115

122116
modules: ['@sentry/nuxt/module'],
123117
sentry: {
124-
sourceMapsUploadOptions: {
125-
org: 'your-org-slug',
126-
project: 'your-project-slug',
127-
authToken: process.env.SENTRY_AUTH_TOKEN,
128-
},
118+
org: 'your-org-slug',
119+
project: 'your-project-slug',
120+
authToken: process.env.SENTRY_AUTH_TOKEN,
129121
},
130122
});
131123
```

packages/nuxt/src/module.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,6 @@ export default defineNuxtModule<ModuleOptions>({
112112

113113
nuxt.hooks.hook('nitro:init', nitro => {
114114
if (serverConfigFile?.includes('.server.config')) {
115-
if (nitro.options.dev) {
116-
consoleSandbox(() => {
117-
// eslint-disable-next-line no-console
118-
console.log(
119-
'[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.',
120-
);
121-
});
122-
}
123-
124115
consoleSandbox(() => {
125116
const serverDir = nitro.options.output.serverDir;
126117

@@ -154,8 +145,20 @@ export default defineNuxtModule<ModuleOptions>({
154145
consoleSandbox(() => {
155146
// eslint-disable-next-line no-console
156147
console.log(
157-
`[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 [...]\`).`,
148+
`[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/.`,
158149
);
150+
151+
if (nitro.options.dev) {
152+
// eslint-disable-next-line no-console
153+
console.log(
154+
`[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.`,
155+
);
156+
} else {
157+
// eslint-disable-next-line no-console
158+
console.log(
159+
`[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 [...]\`).`,
160+
);
161+
}
159162
});
160163
}
161164
}

0 commit comments

Comments
 (0)