Skip to content

Commit

Permalink
feat(node): Add docs for NODE_OPTIONS esm config (#10093)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
  • Loading branch information
mydea and lforst authored May 21, 2024
1 parent c2eda02 commit bb11816
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/platforms/javascript/common/install/esm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ Adjust the Node.js call for your application to use the [--import](https://nodej
node --import ./instrument.mjs app.mjs
```

If it is not possible for you to pass the `--import` flag to the Node.js binary, you can alternatively use the `NODE_OPTIONS` environment variable as follows:

```bash
NODE_OPTIONS="--import ./instrument.mjs" npm run start
```

We do not support ESM in Node versions before 18.19.0.

0 comments on commit bb11816

Please sign in to comment.