module: enable subpath imports in REPL#43450
Conversation
|
Review requested:
|
guybedford
left a comment
There was a problem hiding this comment.
I think this is a good feature to have, but we shouldn't be duplicating the code.
Could the parent for the REPL context not just have a filename set to the CWD directory? I think something like that would be best for this code not to need to know about repl at all and instead for it to be a REPL feature entirely. Alternatively, if something like that on the REPL side isn't at all possible, at least use a temporary variable parentPath to not duplicate the code.
|
Thank you @guybedford I'm not quite clear about your |
Sure. Done. |
guybedford
left a comment
There was a problem hiding this comment.
I take it import() works correctly on the REPL for this same case?
Yes, it works for |
|
Landed in c15a605 |
PR-URL: nodejs/node#43450 Fixes: nodejs/node#43410 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Also enable subpath imports in REPL.
fix: #43410