Skip to content

Commit

Permalink
versioned docs 29.7: append to NODE_OPTIONS, not overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
someone635 authored Nov 30, 2023
1 parent 0d332f4 commit e141b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.7/ECMAScriptModules.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Also note that the APIs Jest uses to implement ESM support are still [considered
With the warnings out of the way, this is how you activate ESM support in your tests.

1. Ensure you either disable [code transforms](Configuration.md#transform-objectstring-pathtotransformer--pathtotransformer-object) by passing `transform: {}` or otherwise configure your transformer to emit ESM rather than the default CommonJS (CJS).
1. Execute `node` with `--experimental-vm-modules`, e.g. `node --experimental-vm-modules node_modules/jest/bin/jest.js` or `NODE_OPTIONS=--experimental-vm-modules npx jest` etc.
1. Execute `node` with `--experimental-vm-modules`, e.g. `node --experimental-vm-modules node_modules/jest/bin/jest.js` or `NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npx jest` etc.

On Windows, you can use [`cross-env`](https://github.com/kentcdodds/cross-env) to be able to set environment variables.

Expand Down

0 comments on commit e141b4f

Please sign in to comment.