I am writing an application on the reactor. Many modules have lines like

import Tools from '../../../components/Tools'; 

Is it possible to somehow get rid of these dots, write something like

 import Tools from __dirname +'components/Tools'; // не работает 

That is, how to start searching for files from the root of the project?

  • write a plugin for the collector you are using. but generally some dumb idea. In this scenario, the correct editors will not click on the links. - user220409
  • one
    Well, for example, you can use webpack-> resolve-> alias webpack.js.org/configuration/resolve/#resolve-alias - xFloooo

0