From f2575006a2fee7f9f3cb4f6619188ec657b822e0 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 20 Jan 2019 16:13:30 -0800 Subject: [PATCH] fix(pnp): make sure pnp module is the first preloaded module. (#6942) * fix(pnp): make sure pnp module is the first preloaded module. * Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ src/cli/commands/node.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c941e3ef8f..b9a13600a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa - Properly reports the error codes when the npm registry throws 500's [#6817](https://github.com/yarnpkg/yarn/pull/6817) - [**Maƫl Nison**](https://twitter.com/arcanis) + +- Changes the location where the `--require ./.pnp.js` flag gets added into `NODE_OPTIONS`: now at the front + + [#6942](https://github.com/yarnpkg/yarn/pull/6942) - [**John-David Dalton**](https://twitter.com/jdalton) ## 1.12.3 diff --git a/src/cli/commands/node.js b/src/cli/commands/node.js index 1fb70fd1ee..9121882b9d 100644 --- a/src/cli/commands/node.js +++ b/src/cli/commands/node.js @@ -23,7 +23,7 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg let nodeOptions = process.env.NODE_OPTIONS || ''; if (await fs.exists(pnpPath)) { - nodeOptions += ` --require ${pnpPath}`; + nodeOptions = `--require ${pnpPath} ${nodeOptions}`; } try {