Closed tbremer closed 7 years ago
This is interesting. Does it also take into account for local directory structure as well?
Are there any performance impacts by loading the node_modules
?
I hadn't checked for local module resolution, but you were right, that was not covered. I've found a way to allow for local modules as well as installed node_modules
.
There should be no performance impact as we are just pushing file paths to the module resolution array, we aren't actually loading any additional modules.
Updated the commit to allow for local module resolution.
Looks good. Merging
This pull request allows for local
node_modules
by pushing the file's path to the repl context if that path has anode_modules
directory.