Skip to content

Commit

Permalink
docs(nuxt): Describe run script more precisely (#11064)
Browse files Browse the repository at this point in the history
* docs(nuxt): Describe run script more precisely

* Update platform-includes/getting-started-config/javascript.nuxt.mdx

Co-authored-by: Charly Gomez <[email protected]>

---------

Co-authored-by: Charly Gomez <[email protected]>
  • Loading branch information
s1gr1d and chargome committed Aug 13, 2024
1 parent 993cf71 commit 1b8a47d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platform-includes/getting-started-config/javascript.nuxt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

```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"
}
}
```

0 comments on commit 1b8a47d

Please sign in to comment.