dream2nix/overrides/nodejs/enhanced-resolve/respect-node-path-v5.patch

14 lines
473 B
Diff

diff --git a/lib/ResolverFactory.js b/lib/ResolverFactory.js
index 21ac9b0..8423a34 100644
--- a/lib/ResolverFactory.js
+++ b/lib/ResolverFactory.js
@@ -220,7 +220,7 @@ function createOptions(options) {
const type = getType(item);
return type === PathType.Normal || type === PathType.Relative;
}
- ),
+ ).concat(process.env.NODE_PATH.split( /[;:]/ )),
mainFields,
mainFiles: new Set(options.mainFiles || ["index"]),
plugins: options.plugins || [],