| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Fixed resolving relative imports when symlink to main file called without file extension Fixies: nodejs#41000
|
Review requested:
|
Sorry, something went wrong.
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sorry, something went wrong.
Sorry, something went wrong.
|
Is it necessary to amend the commit message, or will it be fixed during the merge process? |
Sorry, something went wrong.
Collaborators can specify a different commit message by landing manually the PR. If you fix it yourself, we can use automation to land the PR quicker, but it's no biggie. Thanks for the contribution! |
Sorry, something went wrong.
Fixes resolving main module when the `argv[1]` was pointing to a symlink without its file extension. PR-URL: nodejs#51312 Fixes: nodejs#41000 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Fixes resolving main module when the `argv[1]` was pointing to a symlink without its file extension. PR-URL: nodejs#51312 Fixes: nodejs#41000 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
| Back | FazBrowse Home | New Git URL |
lib: fix --preserve-symlinks-main
When the --preserve-symlinks-main flag is used when running a node, the main file path is resolved to the target path instead of the symlink path. This cause issues with relative imports. This problem occurs when the called symlink does not contain a file extension(i.e. node package, node package/file).
In the loader.js file, there is a function called tryExtensions which in turn calls tryFile. The tryFile function originally only had a check for the --preserve-symlinks flag, so I have added a check for --preserve-symlinks-main as well.
Fixes: #41000