Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dotenvx to dynamically manage environment variables
The real problem I'm running into is that different versions of node can support wildly different options in NODE_OPTIONS. For example `--no-experimental-global-navigator` will be required to make things work on Node 22, but it isn't recognized at all on older versions, and throws an error if we try to include it. I fixed this by adding `scripts/node_options.js` to dynamically decide which options to use depending on the node version, and dotenvx to set the enviroment up before running node. This makes the `npm run` scripts a bit clunky, because they need to call `dotenvx run --quiet -- ` before doing `node whatever`, but for now it seems like the least bad option. This commit also removes `.npmrc` which was great but can only set the NODE_OPTIONS to a single string.
- Loading branch information