S
S
Svyatoslav Khusamov2017-03-28 18:05:21
Node.js
Svyatoslav Khusamov, 2017-03-28 18:05:21

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

1 answer(s)
O
Oleg, 2017-03-28
@khusamov

There are several options .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question