Answer the question
In order to leave comments, you need to log in
How to get rid of the need to write the path to the parent directories of the modules?
How to get rid of the need to write the path to the parent directories of the modules?
Instead,
I would like to write the following:
Here myClass is part of my module, for example, just a class or a function. That is, my files are not located in node_modules. require("../../../path/to/myClass");
require("root/path/to/myClass");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question