From d59cee95920572669c1ebfe3798d7254cf2a98dc Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 13 Aug 2024 11:41:30 +0200 Subject: [PATCH 1/2] docs(nuxt): Describe run script more precisely --- platform-includes/getting-started-config/javascript.nuxt.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform-includes/getting-started-config/javascript.nuxt.mdx b/platform-includes/getting-started-config/javascript.nuxt.mdx index 29a59a8140a712..8a57df3874b208 100644 --- a/platform-includes/getting-started-config/javascript.nuxt.mdx +++ b/platform-includes/getting-started-config/javascript.nuxt.mdx @@ -51,14 +51,15 @@ Sentry.init({ }); ``` -2. Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your application. +2. Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your applications' production build output. For local previews, update your `nuxt preview` script in the `package.json` (see below). Also, ensure this environment variable is set in your deployment environment, such as on Netlify or Vercel. ```json {filename:package.json} { "scripts": { - "preview": "NODE_OPTIONS='--import ./public/instrument.server.mjs' nuxt preview" + "preview": "NODE_OPTIONS='--import ./public/instrument.server.mjs' nuxt preview", + "start": "node --import .output/public/instrument.server.mjs .output/server/index.mjs" } } ``` From bd259cad538f8e9a7076ad15192b1298a5d9dec6 Mon Sep 17 00:00:00 2001 From: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:20:49 +0200 Subject: [PATCH 2/2] Update platform-includes/getting-started-config/javascript.nuxt.mdx Co-authored-by: Charly Gomez --- platform-includes/getting-started-config/javascript.nuxt.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-config/javascript.nuxt.mdx b/platform-includes/getting-started-config/javascript.nuxt.mdx index 8a57df3874b208..6d39e7586367d9 100644 --- a/platform-includes/getting-started-config/javascript.nuxt.mdx +++ b/platform-includes/getting-started-config/javascript.nuxt.mdx @@ -51,7 +51,7 @@ Sentry.init({ }); ``` -2. Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your applications' production build output. +2. Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your application's production build output. For local previews, update your `nuxt preview` script in the `package.json` (see below). Also, ensure this environment variable is set in your deployment environment, such as on Netlify or Vercel.