0

I have a standard and recommended layout for my React JS project. I am attempting to navigate to the route of the imports folder from a component without the need to do ../../../../ depending where the original component is.

So instead of import { Avatar } from '../../../../reusable/avatar.js';

I would do import { Avatar } from '/client/components/reusable/avatar.js';

My file structure follows:

- imports
      - api
      - client
        - components
- public (reference from "/")
- server
Pavlo
  • 43,301
  • 14
  • 77
  • 113
Allreadyhome
  • 1,252
  • 2
  • 25
  • 46

0 Answers0