From 66fa5ba9d095e74b7f049aeec82e2200d194a779 Mon Sep 17 00:00:00 2001 From: Felix-Dube Date: Thu, 30 Nov 2023 06:38:43 -0500 Subject: [PATCH] docs: append to NODE_OPTIONS, not overwrite --- docs/ECMAScriptModules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ECMAScriptModules.md b/docs/ECMAScriptModules.md index feaed6bdb961..5495913aaaef 100644 --- a/docs/ECMAScriptModules.md +++ b/docs/ECMAScriptModules.md @@ -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.