Experience-Monks / devtool

[OBSOLETE] runs Node.js programs through Chromium DevTools
MIT License
3.76k stars 148 forks source link

Resolve symlinks in Module._load #92

Closed aleclarson closed 6 years ago

aleclarson commented 8 years ago

Since I have symlinks in the node_modules of many of my local packages, I have altered Module._load to support symlink resolution. This effectively cleans up stack traces when using symlink'd depedencies.

For paths that are neither absolute nor relative:

This PR also includes support for relative imports via the console.

// When entered in the console, it's assumed you mean "relative to process.cwd()".
require('./my-module')
aleclarson commented 8 years ago

After my patches, this all works as intended. LMK what you think. 😁

aleclarson commented 6 years ago

126 provides the "relative imports from console" fix

The symlink-related code is no longer useful. At least with electron@2.x.x, which is all I tested.