diff --git a/packages/nuxt/README.md b/packages/nuxt/README.md index e33201b21518..7da84dd010f4 100644 --- a/packages/nuxt/README.md +++ b/packages/nuxt/README.md @@ -62,24 +62,18 @@ export default defineNuxtConfig({ }); ``` -2. Add a `sentry.client.config.(js|ts)` file to the root of your project: +### 3. Client-side setup + +Add a `sentry.client.config.(js|ts)` file to the root of your project: ```javascript import * as Sentry from '@sentry/nuxt'; -if (!import.meta.env.SSR) { - Sentry.init({ - dsn: env.DSN, - replaysSessionSampleRate: 0.1, - replaysOnErrorSampleRate: 1.0, - }); -} +Sentry.init({ + dsn: env.DSN, +}); ``` -### 3. Server-side Setup - -todo: add server-side setup - ### 4. Vite Setup todo: add vite setup diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 976b948b741d..b6af634dd0d4 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -42,10 +42,9 @@ "nuxt": "3.x" }, "dependencies": { - "@nuxt/kit": "^3.12.2", + "@nuxt/kit": "^3.12.3", "@sentry/browser": "8.15.0", "@sentry/core": "8.15.0", - "@sentry/node": "8.15.0", "@sentry/opentelemetry": "8.15.0", "@sentry/types": "8.15.0", "@sentry/utils": "8.15.0", @@ -53,8 +52,8 @@ "@sentry/vue": "8.15.0" }, "devDependencies": { - "@nuxt/module-builder": "0.8.0", - "nuxt": "^3.12.2" + "@nuxt/module-builder": "0.8.1", + "nuxt": "^3.12.3" }, "scripts": { "build": "run-p build:transpile build:types build:nuxt-module", diff --git a/packages/nuxt/src/common/snippets.ts b/packages/nuxt/src/common/snippets.ts deleted file mode 100644 index 5b8a3f1f3ea1..000000000000 --- a/packages/nuxt/src/common/snippets.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; - -/** Returns an import snippet */ -export function buildSdkInitFileImportSnippet(filePath: string): string { - const posixPath = filePath.split(path.sep).join(path.posix.sep); - - // normalize to forward slashed for Windows-based systems - const normalizedPath = posixPath.replace(/\\/g, '/'); - - return `import '${normalizedPath}';`; -} - -/** - * Script tag inside `nuxt-root.vue` (root component we get from NuxtApp) - */ -export const SCRIPT_TAG = '