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
  • 40,007
  • 13
  • 74
  • 108
Allreadyhome
  • 1,201
  • 1
  • 24
  • 45

0 Answers0