You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this works! If I click on require('shared/whatever-file.js'), HyperClick opens /shared/whatever-file.js.
But now HyperClick doesn't know about node_modules, which was a nice feature.
Why it matters which path opens
The /shared/whatever-file.js file, and the /scripts/node_modules/shared/whatever-file.js file are the same file on disk, so why do I care that the first is opened instead of the second?
Sublime's Ctrl+P, "File: Reveal in Sidebar" doesn't work with the first
My .eslintignore file ignores node_modules, and I want linting on files in my project
I'll sometimes have both paths of the file open simultaneously, which is confusing
How to solve
I hope that prioritizing lookup_paths over vendor_dirs would solve my problem, and hopefully not cause issues for anyone else. (Maybe my mental model is wrong, and lookup_paths/vendor_dirs don't have a peer relationship?)
Or maybe you can think of a better solution/workaround?
The text was updated successfully, but these errors were encountered:
Situation
In a JavaScript monorepo project:
I want to easily import shared code from
/shared
into the other directories. So there are symlinks set up:HyperClick's default behavior
HyperClick opens
/scripts/node_modules/shared/whatever-file.js
when I click onrequire('shared/whatever-file.js')
.I consider this to be expected behavior, but it's not the behavior that I want.
I want
/shared/whatever-file.js
to open.Unexpected behavior with my attempted workaround
HyperClick seems to prioritize the
vendor_dirs
abovelookup_paths
, so HyperClick continues to open/scripts/node_modules/shared/whatever-file.js
.Changing the workaround
If I change my HyperClick Settings file
this works! If I click on
require('shared/whatever-file.js')
, HyperClick opens/shared/whatever-file.js
.But now HyperClick doesn't know about
node_modules
, which was a nice feature.Why it matters which path opens
The
/shared/whatever-file.js
file, and the/scripts/node_modules/shared/whatever-file.js
file are the same file on disk, so why do I care that the first is opened instead of the second?Ctrl+P, "File: Reveal in Sidebar"
doesn't work with the first.eslintignore
file ignores node_modules, and I want linting on files in my projectHow to solve
I hope that prioritizing
lookup_paths
overvendor_dirs
would solve my problem, and hopefully not cause issues for anyone else. (Maybe my mental model is wrong, andlookup_paths
/vendor_dirs
don't have a peer relationship?)Or maybe you can think of a better solution/workaround?
The text was updated successfully, but these errors were encountered: