Using path.resolve

In our JavaScript code, to make sure the code runs well whenever we run it from, we modified our `require` statements to use `path.resolve`. For example:

const QueryManager = require(path.resolve(__dirname, 'query-manager.js'));

This works fine. However, I now lost the ability to click on a name and get to the right file automatically.

Is there a known workaround for this?


PS. I'm actually using GoLand, but I assume for javascript questions WebStorm is better suited.

1 comment
Comment actions Permalink

Resolving 'constructed' paths is not currently supported, please vote for and linked tickets to be notified on any progress with these features

Paths resolving in path.resolve() doesn't work either -


Please sign in to leave a comment.