Absolute file paths can help organize the imports in your JavaScript projects by improving the way import locations are fetched by the compiler. Relative paths are commonly used, but they can lead to confusion and maintenance challenges, especially in large and complex projects. You’ll get situations like the example below in which your try to use the previous directory command “../

Source